Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Play multiple songs
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ibattlehd




PostPosted: Fri Jan 13, 2017 10:25 am   Post subject: Play multiple songs

What is it you are trying to achieve?
Play multiple songs during my game


What is the problem you are having?
I do not know how to stop a song and play another song


Describe what you have tried to solve this problem
process DoMusic


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:


process DoMusic
    loop
        Music.PlayFile ("AC_DC - T.N.T.wav")
    end loop
end DoMusic
fork DoMusic


Please specify what version of Turing you are using
Turing 4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Fri Jan 13, 2017 10:29 am   Post subject: RE:Play multiple songs

Turing is a bit funny with music. I don't think it can play multiple WAV files, but it might do mp3s. If not, try mixing different file types until you find a combination that works.
ibattlehd




PostPosted: Fri Jan 13, 2017 10:31 am   Post subject: Re: RE:Play multiple songs

Insectoid @ Fri Jan 13, 2017 10:29 am wrote:
Turing is a bit funny with music. I don't think it can play multiple WAV files, but it might do mp3s. If not, try mixing different file types until you find a combination that works.

Thank you. I want a new song to play after the previous one has finished. Do I create a new process for the new song after the above process?
Insectoid




PostPosted: Fri Jan 13, 2017 10:48 am   Post subject: RE:Play multiple songs

I don't think Turing has any built-in way to check if a song has finished playing or not. All I can think of is to use Time.Elapsed() to determine when the song will probably finish before starting the next.


By the way, Music.PlayFileLoop() will remove the need to use a process at all (it has one built in) and allows you to use Music.PlayFileStop() to end playback.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: