Rewind - Fast Forward Button (Audio Player)

6 views (last 30 days)
Nikos Korobos
Nikos Korobos on 20 Apr 2022
Edited: Nikos Korobos on 23 Apr 2022
Greetings everyone
So I coded an audio player(Matlab GUI) for wav files including a Play, Volume, Stop button etc.
Was wondering if it is possible to code a rewind and a fast-forward button while an audio file is playing.
Got any ideas or code samples to achieve that?
Here's my code for the Play Button:
Thanks in advance!

Answers (1)

jibrahim
jibrahim on 22 Apr 2022
Hi Nikos,
dsp.AudioFileReader has a ReadRange property that controls the range of samples you want to read. Here is an idea: when you apply rewind or fast forward, you can stop playback (by alling release on the objects), and set the first value of ReadRange to the desired start location before you restart playback.
  1 Comment
Nikos Korobos
Nikos Korobos on 22 Apr 2022
Edited: Nikos Korobos on 23 Apr 2022
Hello @jibrahim, got any code example on how I can set this up?
Guess you are reffering to this method release
Also is there any way I could stop the audio playback and save the audio at that specific point so it can restart playing faster?
Thanks in advance!

Sign in to comment.

Tags

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by