Sound Capabilities - part 2

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Sjatplat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 75
Joined: Wed Jun 22, 2011 1:53 pm

Sound Capabilities - part 2

Post by Sjatplat » Tue Apr 24, 2012 12:17 am

Hi All

After part 1 of the investigation of the sound barriers in Livecode I have encountered some weird things...

Since livecode has a limitation of 1 - ONE - sample a time using the play command I had to rethink my stragety if I was to make my game in Livecode wich I could "deploy anywhere". I had to use a combination of "players" and the limited to - 1 - ONE - sample -"play "sample1.wav" command in my project.

Playing a wavefile with the play "wavefile.wav" works, but if the user does something that makes your program play another wavefile, the other wavefile is cut and the new wavefile is played instead. So to get a lot of sounds to play at the same time - which is important to a lot of games- you have to use a combination of the play command that plays imported wavefiles (not mp3-files - I just get noise) and the player object.

Ok...Im all for limits....just have to wrap my head around the strange limits....and find a way to make livecode do what I want....

So I set up three players - each with their own ambience track - or sound file (they wont accept mp3 in my case). But trouble is....If I load a wavefile it wont play and if a load mp3 file into the player - the players height suddenly is 10045. If I resize the player to a managable size - lets say 200x200 then it bleeds through all my controls and mucks them up - even if I set the invisible of the player to true.....

gee - what a complete messs the sound part of livecode is.....
how is it even possible that this has not met any proper demands?
Because Ios has support for multiple sounds....
....but not windows or mac?

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Sound Capabilities - part 2

Post by shaosean » Tue Apr 24, 2012 2:10 am

Try toggling the "alwaysBuffer" property and then setting the visible to FALSE.. if this still causes bleeding, then set the size of the player, lock the size and then set the left property to a negative number to hide it off the stack window..

Post Reply