How do I switch between audio files, maintaining the same position in either file?
Show older comments
I'm building a GUI to perform some psychoacoustic tests.
The subjects will be able to click on a button and some audio will start playing. If they click on a different button, a different audio should start playing but from the same position that the first one was at when the user clicked the 2nd one.
The only difference between each audio is there amplitude (same duration and sampling rate).
I have already prepared my files and wrote a piece of code so that they are imported when the GUI initializes (I used setappdata so I can share it between functions).
My main problem right now is to make a continuous play i.e. when the user presses a second button, I should save the current sample and make other audio file to start playing from that position.
1 Comment
Sean de Wolski
on 14 Oct 2013
I would preload all of the files if they're relatively small and this is an option. What code are you using now to play them?
Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!