Page 1 of 1

Audio plays only static/hiss

Posted: Fri May 03, 2013 5:35 am
by rumplestiltskin
Using the Community Edition on my Mac. When I attempt to play an imported audio file of any sort (mp3, aiff, wav), all I get is static or hiss or something best described as audio distortion of some sort. Just in case my stack was corrupted, I quit LC, re-started, re-launched LC, created a new stack, imported a known-good audio file (that played fine in the Finder and with QT Player) and got the same result - bad audio hiss/distortion.

Known bug in the new version or ???

Thanks,
Barry

EDIT: Hmm...also happening in v4.6.4 Commercial. Tried referencing the audio using the QT Player object and the sound plays properly. It is a puzzlement.

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 6:17 am
by Simon
Hi Barry,
http://forums.runrev.com/phpBB2/viewtop ... mp3#p57677
That should get you going.

Simon

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 6:38 am
by rumplestiltskin
Simon,

Just exported the .m4a as a .aif (using QT Player Pro). Imported into LC and same result (weird distortion).

Maybe I'm using the wrong code?
play "3Sec.aif" (not working)
play audioClip "3Sec.aif" (not working)

If I create a player object and reference the clip, it plays fine when I click the player's play button. Using the Message box with the Player's fileName:
play audioClip "/Users/blevine/Downloads/3Sec.aif" results in garbage (with or without the word audioClip).

Edit: The player object works programmatically:
start player "Player"
...that plays the referenced file properly. It's the imported file that doesn't play. I'm attaching that file to this post. Perhaps someone might test it and let me know if it plays in your stack. Thanks!

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 6:44 am
by Simon
Hi Barry,
It's:
set fileName of player "myPlayer" to "/Users/blevine/Downloads/3Sec.aif"
start player "myPlayer"

Simon

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 8:49 am
by bn
Hi Barry,

it seems to be a sampling problem, not all AIFs are equal.

I used
aif_Settings.png
aif_Settings.png (33.07 KiB) Viewed 6911 times
and converted your aif to
Tick2.aif.zip
(4.58 KiB) Downloaded 223 times
and that works.

Other settings might work also but you would have to try.

Kind regards
Bernd

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 6:11 pm
by rumplestiltskin
Yep; looks like all I had to do was use the 16 bit. I may have set it to 24 bit during an earlier export unrelated to what I was doing with LiveCode and it "stuck" there. Thanks so much for your help!

Barry

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 6:25 pm
by Klaus
Hi Barry,

Livecode is VERY picky when it come to "play ac XYZ"!
Use a player object whereever possible!

One of the stretch goals of the Kickstarter Project was an overhaul of the multimedia engine,
lets hope they will implement that very soon!

Hint:
For these low quality sounds you can also use the AU format, which plays fine with "play ac XYZ"!
Use 8 or 16 bit sample size and 11.025, 22.050 or 44.100 sample rate.
Files are quite small, too!


Best

Klaus

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 7:22 pm
by rumplestiltskin
Klaus wrote:{snip}...
Hint:
For these low quality sounds you can also use the AU format, which plays fine with "play ac XYZ"!
Use 8 or 16 bit sample size and 11.025, 22.050 or 44.100 sample rate.
Files are quite small, too!...{snip}
Will those work in Windows and iOS apps, as well?

Thanks,
Barry

Re: Audio plays only static/hiss

Posted: Fri May 03, 2013 8:46 pm
by Simon
I stick with the player object and mp3.
Everything plays mp3 now.

Simon

Re: Audio plays only static/hiss

Posted: Sat May 04, 2013 12:14 pm
by Klaus
Hi Barry,
rumplestiltskin wrote:
Klaus wrote:{snip}...
Hint:
For these low quality sounds you can also use the AU format, which plays fine with "play ac XYZ"!
Use 8 or 16 bit sample size and 11.025, 22.050 or 44.100 sample rate.
Files are quite small, too!...{snip}
Will those work in Windows and iOS apps, as well?
yes, AU will also "play" well on Windows!

But not on iOS, since Livecode on iOS does not support internal sounds anyway! 8)
No idea if iOS will play AU files at all, sorry.

Best

Klaus