play audioClip just plays static

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
markosborne
Posts: 8
Joined: Sat Mar 20, 2010 6:03 pm

play audioClip just plays static

Post by markosborne » Fri Oct 05, 2018 5:19 pm

Hello All,

I'm trying to play audio in an app - initially in the LiveCode IDE - but all I get is heavy static/hissing and just a faint indication of the actual content of the audio clip.

This is code I am using:

play audioClip "/Users/markosborne/Documents/L2_development/page_2_3.wav"
wait until the sound is done
show image "page_2_3_bubble.png"

The page_2_3_bubble.png shows after the clip (static) is done,

I'm using LiveCode Indy 9.0.1 | Build 15103 on MacOS 10.12.6

The same effect happens if I play the clip through a Player control. It is also true for .mp3 & .aif file types.

But all the clips play fine outside of LiveCode.

Any thoughts anyone?

Mark

Klaus
Posts: 10409
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: play audioClip just plays static

Post by Klaus » Fri Oct 05, 2018 7:18 pm

Hi Mark,

well, that SHOULD of course work, at least in a player object and does since many many years for me. If you like you can send me a sound file which does not play on your machin in LC.

Send it to: klaus AT major-k.de


Best

Klaus

P.S.
IDEA! :D
Please check if your player object has its "donuseqt" set to FALSE!
...
answer the dontuseqt of player "your player here"
...
If you see FALSE, then set it to true and try again
Hint:
There is no checkbox for this in the property inspector, so you need to use the message box.

In later versions of LC this property is set to TRUE by default.
Not sure this is the culprit, but worth a try!

markosborne
Posts: 8
Joined: Sat Mar 20, 2010 6:03 pm

Re: play audioClip just plays static

Post by markosborne » Wed Oct 10, 2018 9:39 am

Thanks for your help Klaus,

After some trial-and-error testing, I discovered that the issue was that the audio files were 32 bit.

It appears that the play audioClip method only supports <= 16 bit audio files (at least on my system). Although 32 bit audio is supported when playing the clips through a Player control (testing/setting donuseqt of the control seemed to get that working).

I re-sampled the files to 16 bit (using *.wav), and it all works just fine.

Best

Mark

Klaus
Posts: 10409
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: play audioClip just plays static

Post by Klaus » Wed Oct 10, 2018 10:45 am

Hi Mark,

OK, glad you got it working! :-)

Yes, the (old and internal, no dependencies) "play ac xyz" command is very limited and will only play uncompressed WAV and AIF files (obviously <= 16 bit) and the compressed AU format.

The player object uses the multimedia-engine of the underlying OS, so that made the difference for you.


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”