Distorted sound
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Distorted sound
Audio playback via the "play <filepath>" command produces distortion when trying to play mp3 or AAC (m4a) files. Works ok with a WAV.
Tried various settings, output from Audacity and other MP3s I have.
Running LC 8.1.7 on Mac 10.13.2.
Tried various settings, output from Audacity and other MP3s I have.
Running LC 8.1.7 on Mac 10.13.2.
Re: Distorted sound
Hi yeldarb,
the "play" command on desktop is quite old and VERY picky!
You can only "PLAY" uncompressed AIF and WAV files and the (compressed by nature) AU file format. Everything else will produce white noise, as you have experienced.
Since you can only play ONE sound at a time with the play command, using a player-object is the way to go with sounds (and video, of course)!
Best
Klaus
the "play" command on desktop is quite old and VERY picky!
You can only "PLAY" uncompressed AIF and WAV files and the (compressed by nature) AU file format. Everything else will produce white noise, as you have experienced.
Since you can only play ONE sound at a time with the play command, using a player-object is the way to go with sounds (and video, of course)!
Best
Klaus
Re: Distorted sound
Would be nice to have that documented. This page:
http://livecode.byu.edu/audio/audioplayback-mobile.php
clearly implies the play command will work with mp3s:
http://livecode.byu.edu/audio/audioplayback-mobile.php
clearly implies the play command will work with mp3s:
For playing back a single sound file the simplest method is to use the play command. The syntax is straightforward:
play path-to-sound-file
So if you keep your sound files in a folder called "sounds" in the same folder as your app, in a script it might look something like this:
put specialFolderPath("resources") & slash & "sounds" & slash & "boing.mp3" into tSound
play tSound
Re: Distorted sound
Yes, these formats work on MOBILE, just like the webpage says -> audioplayback-mobile.php!yeldarb wrote: ↑Tue Jan 23, 2018 11:55 pm...
This page:
http://livecode.byu.edu/audio/audioplayback-mobile.php
clearly implies the play command will work with mp3s:...
Re: Distorted sound
Hi,
I have found these settings produce audio files that play without distortion for LC on desktop machines:
16-bit, 44100 Hz sample rate, mono.
Better?
Tom B.
I have found these settings produce audio files that play without distortion for LC on desktop machines:
16-bit, 44100 Hz sample rate, mono.
Better?
Tom B.
Re: Distorted sound
Tom, thanks, are you referring to exporting as MP3? I resampled to 16 bit 44.1khz and then exported to MP3,
still distorted.
still distorted.
Re: Distorted sound
I've "cured" the distortion in both wav and mp3 files using those settings. I am using a Player object in LC 7.x to play the audio. I'm on Windows (no QT installed).
Tom
Re: Distorted sound
So what I'm hearing is to avoid beating my head against a bunch of limitations, I should probably just use a player object.
Re: Distorted sound
Yep, that's the bottom line of this thread.
Re: Distorted sound
No, this is the bottom line of this thread is actually
Return to “Getting Started with LiveCode - Experienced Developers”
Return to “Getting Started with LiveCode - Experienced Developers”
Re: Distorted sound
Hey dude, nobody likes wisenheimer!
Re: Distorted sound
That was targeted to Mr. Bogs actually.