|
"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in message <gh823u$fev$1@fred.mathworks.com>...
> Hi,
>
> I have 2 sound files in .wav format. I need to run those two files.
> When i am playing first sound file, if i want to stop it and want to play the second, what do i do??
>
> Just have look at the following:
> [y, Fs] = wavread('F:\sound_1.wav');
> [y1, Fs1] = wavread('F:\sound_2.wav');
> wavplay(y,Fs,'async') ;
> wavplay(y1,Fs1,'async') ;
>
> Here, 1st sound file which is running has to be stopped as soon i execute the 4th line code.
>
> Any help would be greatly appreciated ..
>
> Ashwini
The problem is that you put a whole block of data into y and y1.
Lets say it is a 2min Track then it need 2min till it will finished. To solve this problem, you have to write an m-file wich puts only small blocks into y and y1 and everytime time the data is done, refill/put again the y or y1.
Hope that helps a bit.
|