• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Trying to play audio files in succession

W

Waylander

Guest
I'm looking to play a succession of audio files one after the other and I'm having a tough time trying to figure out how to do it. The audio_create_play_queue function looks like it might be what I want, but after reading up on it, I'm not too sure.

Anyone have any advice? It doesn't need to be fancy.
 

HayManMarc

Member
Maybe this? (I'm asking because I'm not sure if this is the easiest or most relevant way.)

audio_create_play_queue
 
W

Waylander

Guest
Yea, that's what I mentioned I was looking at. But looking at the documentation on it has me wondering if it is what I need or not. It might be, and I might not be thinking about it in the right way. So if anyone thinks that'll suit my purpose, I'd love some advice on how to use it in this way.
 
I have a piggyback question (one I asked a while ago but got no answer), is there a way to play several sounds in sequence with no delay between them? I.e. the listener would not hear any seam in the transition between one sound and then next (assuming the sounds were designed to match at their end points).
 
W

Waylander

Guest
I am wanting to play an audio file for each string in a list. As of right now, I have a for loop looping through my list and inside that loop is a switch containing each possible string (which is just a word). Naturally when I want to simply play an audio file for each string, it plays them on top of each other because it loops so fast. I'm trying to figure out how I can pause or wait a short amount of time after playing each file before it loops again. I've tried creating my own timer but I can't figure out how to implement it correctly. I've wondered if alarms might work here but for the life of me, I haven't been able to get one of those to work outside of a tutorial to save my life.
 
W

Waylander

Guest
Aura, I read your other post and it sounds exactly like what I need. Can you offer some advice on how I can use it to "stitch" together some audio files? Looking at the code in the help files isn't proving very useful to me (but I've also never done anything like this before, though).

HayManMarc, I'll check out your code :).
 
W

Waylander

Guest
HayManMarc, I've created another post specific to creating an audio buffer (per Aura) so I can explore that option, but I've looked at your code and it is incredibly simple, it works, and I might try to implement it while waiting! :)
 

HayManMarc

Member
HayManMarc, I've created another post specific to creating an audio buffer (per Aura) so I can explore that option, but I've looked at your code and it is incredibly simple, it works, and I might try to implement it while waiting! :)
Good! That's a relief. :)
 
W

Waylander

Guest
Trying to get it to work in my program right now, but I keep getting an out of range error somehow (which didn't happen in yours). Problem is that my debugger is SUPER slow for some reason which makes stepping through a program impossible. So I'm trying to track down the cause of the issue.
 
W

Waylander

Guest
I got it to work! Just had to make a small adjustment since I had to implement it slightly differently than you did. Thank you VERY much! Now to try to figure out how to get a bit of silence between the audio files. I might just resort to having about a half a second of silence after each audio file so it'll take care of itself.
 

HayManMarc

Member
I cut all the extra silence from each of the four tracks in Audacity. You could just add some silence to yours also using Audacity. It's a great sound tool, if you're not familiar.
 
W

Waylander

Guest
Yea, I can use audio tools pretty well. Was just wondering if I should go that route or do it somehow via code and perhaps a 0.5 second silent audio file plugged in there somewhere.
 
Top