Still stuck on playing a sound with a player

Graham Samuel livfoss at mac.com
Tue Dec 17 07:33:22 EST 2013


Klaus, thanks. Am rushing off somewhere but will take your advice when I come back. I don't know why I didn't know you have to write 'start player', but all I can say is that the LC User Guide is good on callbacks but hopeless on other stuff... still, I know it's going to be my fault in the end (sigh).

Graham

On 17 Dec 2013, at 12:49, Klaus major-k wrote:

> Hi Graham,
> 
> Am 17.12.2013 um 10:52 schrieb Graham Samuel <livfoss at mac.com>:
> 
>> Hi Jacque - thanks for your continued efforts to help. 
>> 
>> When I do the 'play', I get "no data in AudioClip". This is after I rewrote the code to use a separate invisible stack for the players, as you suggested. The player itself definitely exists.
> 
> See below...
> 
>> The script of the card I want to be showing while the sound plays just says:
>> 
>> on openCard
>>    set the playrate of player "playPoem" of cd 1 of stack "sounds" to 1 
>>    play "playPoem" of cd 1 of stack "Sounds" -- this just carries on until the player gets a 'playstopped' message
>>    put the result
>> end openCard
> 
> some comments:
> 1. "set the playrate of player XYZ to 1" already STARTS that player!
> 2. OFFICIAL syntax to start a player object: "start player XYZ"
> 3. "play" is "reserverd" for playing audio files that are NOT in a player object
> 
> Not that this would cause your problems... 8-)
> 
>> The player "playPoem" is newly attached to an MP3 file, which I have now moved to be next to the LC app in the 'Applications' folder, just for a change. Actually I get the same result even if I set the filename of each player at runtime.
>> I get the feeling I am disobeying some secret rules. Jacque, when you use a separate stack for sounds, how do you initiate the sounds?
> 
> Hm, I also use a lot fo mp3 files and never had any problem with any player object (on a Mac!!! ;-)
> 
>> TIA and sorry to take up your time.
>> 
>> Graham
> 
> Best
> 
> Klaus
> 
> 
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list