openAL won't play a second song

Apprentice
Posts: 14
Joined: 2015.01
Post: #1
I've been working on making an app that plays music from the user's music library using alsource, but I've run into a bug I can't seem to get around. After my first song finishes (or I stop it), I try to play a second one, and it leaves me in silence. alGenSources(1, &source); seems to be the first line where things go wrong. Here's how I clear the source and buffers when I'm done with the first song. alDeleteSources(1,&source); alDeleteBuffers(1,buffers); context=alcGetCurrentContext(); device=alcGetContextsDevice(context); alcMakeContextCurrent(NULL); alcDestroyContext(context); alcCloseDevice(device);
Quote this message in a reply
Apprentice
Posts: 14
Joined: 2015.01
Post: #2
turns out all i needed to do was add source+=1; just took a little over a month to try that
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  AVAudioPlayer stutters the game when changing song AdrianM 0 5,176 May 13, 2010 03:59 PM
Last Post: AdrianM