Sounds Not working Ubuntu 14.04

Deploying to Linux? Get penguinated here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Sounds Not working Ubuntu 14.04

Post by sefrojones » Sun Jul 06, 2014 7:14 pm

For some reason I can not get sounds to play in any of my LC stacks in Ubuntu. I recently converted, so I'm not really sure where to look to remedy this. The sounds and stacks play well in WIndows, but for some reason I cannot get a sound to play(in LiveCode)while running ubuntu.

Any Ideas?

--Sefro

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9461
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sounds Not working Ubuntu 14.04

Post by richmond62 » Sun Jul 06, 2014 10:16 pm

Well; I don't know how you are trying to play a sound file on Linux - my experience of it
is 100% negative; meaning you cannot do it.

Thinking I had missed something; I downloaded a free mp3 file: http://www.gaberlunzie.com/

converted 'Tae the Beggin' into an AIFF file with Audacity: http://audacity.sourceforge.net/ [which, bye-the-bye, is de rigeur for Linux users]

Renamed the new file TTB.aiff

and embedded it in a stack containg a button with this script:

on mouseUp
play TTB.aiff
end mouseUp

sophisticated programming it ain't :)

NIX!

Hence my recent posting in the Use-List.

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Sounds Not working Ubuntu 14.04

Post by sefrojones » Mon Jul 07, 2014 2:06 pm

richmond62 wrote:Well; I don't know how you are trying to play a sound file on Linux - my experience of it
is 100% negative; meaning you cannot do it.
Well that is a bummer. I was hoping to completely remove WIN 7 from my life, but I guess I'll need to keep it around for any projects that may need sound....

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Sounds Not working Ubuntu 14.04

Post by MaxV » Mon Jul 07, 2014 2:54 pm

Audio works perfect on Linux, just install mplayer. You can use the video player to produce any file recognized by mplayer (quite all type of media).

then you can use:

Code: Select all

start player 1
and

Code: Select all

stop player 1
I just did it on my Linux machine. I played a MP3 audio file.
It's describe very well on Livecode user guide:
13.3.1 The Player Object
Use the player object to play and interact with video and audio. To create a player object,
drag one onto your stack from the Tools palette. To select a movie file to play, open the
Inspector for the player object and select a file to use as the source. Doing this sets the
player's fileName property.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Sounds Not working Ubuntu 14.04

Post by sefrojones » Mon Jul 07, 2014 3:04 pm

What about playing sounds without the player object? i have a game that works perfectly in windows using the "play" command, running in linux, none of the sounds play.......

Edit: I downloaded Mplayer, and am able to get player objects to work, but still no play command. If I import an audio clip and attempt to play it in the project browser or through scripted "play" command, it does not play. Seems...less than perfect....

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Sounds Not working Ubuntu 14.04

Post by MaxV » Mon Jul 07, 2014 3:11 pm

Did you install the pulseaudio-esound-compat package?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Sounds Not working Ubuntu 14.04

Post by sefrojones » Mon Jul 07, 2014 3:20 pm

I installed Mplayer, and did a "sudo apt-get install pulseaudio-esound-compat" then rebooted (just in case), and still no play command......

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

Re: Sounds Not working Ubuntu 14.04

Post by Klaus » Mon Jul 07, 2014 4:00 pm

No idea about Linux, but Livecode is VERY picky when it comes to play internal sounds!

As far as I know, only uncompressed WAV and (compressed by natur) AU files are officially
supported at all by Livecode with-> play AC "name of sound.au"

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Sounds Not working Ubuntu 14.04

Post by sefrojones » Mon Jul 07, 2014 4:15 pm

The sounds in question are all uncompressed WAV files, that work well in windows. It seems that I cannot play internal sounds at all in linux. The player object works, but the play command does not.

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

Re: Sounds Not working Ubuntu 14.04

Post by Klaus » Mon Jul 07, 2014 4:44 pm

Ah, I see. Looks like Linux is still Livecodes "poor cousin" 8)

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Sounds Not working Ubuntu 14.04

Post by MaxV » Mon Jul 07, 2014 4:59 pm

It's a Esound driver issue. Esound was a very common sound daemon on Linux, but now everybody use PulseAudio sound daemon.
You can try to uninstall pulseaudio and install esound.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Sounds Not working Ubuntu 14.04

Post by sefrojones » Mon Jul 07, 2014 5:17 pm

I tried uninstalling pulse-audio and installing esound. No joy. It also seems to have removed a majority of the icons in my system setting (including sound)
perhaps I am not as ready to switch OSs as I thought......

edit: got my system settings back with:

sudo apt-get install ubuntu-desktop

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9461
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sounds Not working Ubuntu 14.04

Post by richmond62 » Mon Jul 07, 2014 9:29 pm

Whichever way one cuts things the simple fact is that
one cannot roll a standalone together for Linux so that
and end-user can install it and have sound playing
"just like that".

AND that doesn't seem right.

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Sounds Not working Ubuntu 14.04

Post by MaxV » Tue Jul 08, 2014 8:48 am

As mentioned on user guide:
Note: We recommend you use the player object for playing audio as it supports a wide
range of formats and compression types. Use the audio clip when you need basic audio
playback on systems that do not have any of the 3rd party libraries supported by the
player object installed
So using player resolve any problem. My opinion that in future audioclip support should be dropped. Audio clip file format is very limited: just WAV, AIFF and AU files. On the contrary player object reads any format.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

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

Re: Sounds Not working Ubuntu 14.04

Post by Klaus » Tue Jul 08, 2014 11:30 am

Come on, Max!
Playing audioclips should of course NOT be dropped, but rather enhanced to work with "modern" file formats! 8)

"play ac xyz" is being executed internally by Livecode, but "player objects" are relying on 3rd party software
already installed on the target machine, like Quicktime on Mac and Win in the moment.

Post Reply

Return to “Linux”