audio compression (shorten an audio file)

2 vues (au cours des 30 derniers jours)
a a
a a le 4 Déc 2018
Commenté : a a le 10 Déc 2018
I want to compress an audio file to make it shorter to put in a game for sound effects. I use the following:
[y,Fs]=wavread('blast.wav');
t1=0;% start time
t2=2;% end time
yNew=y((Fs*t1+1):Fs*t2,1);
wavwrite(yNew,Fs,'soundShort.wav');
The compression is fine and 'soundShort.wav' can play. But command sound(wavread('soundShort.wav')) no longer has any sound, though it's runnable. I wonder what goes wrong.
  13 commentaires
Walter Roberson
Walter Roberson le 9 Déc 2018
http://pcauthorities.com/windows-xp/how-to-troubleshoot-sound-problems-in-windows-xp/
a a
a a le 10 Déc 2018
thank you. after reading it, i still don't know what went wrong for my winxp. on my winxp, 'beep' has a sound while 'sound(beep)' doesn't.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by