playing wav files in matlab-
7 次查看(过去 30 天)
显示 更早的评论
I have wav files that I want to play- I read them using wavread, and play them using sound or play(audioplayer).
my problem is that for this assignment precision is important, and some how my files are sound later then they should be-
all my files work this way- silence for x milliseconds ,and a strong noise for just a couple milliseconds afterwards.
but in my code, using both functions the sound comes too far behind the x milliseconds..
what can I do to make it more precise? maybe changing stuff like bits or Fz?
0 个评论
回答(1 个)
Image Analyst
2012-10-21
Maybe load them in prior to needing to play them so you don't have to waste time reading from disk at the instant that they need to be played. You might also try bumping up the priority of the MATLAB process (control-shift-Esc, right click process and set priority to high, NOT real time). Others may have other ideas. When you play your waves, do other players have silence, then the sound, then loud noise at the end? You might want to open up your sound file in a program like free Audacity to see what the waveform looks like. Trim off the noise at the end or silence from the beginning if there is any, then resave the cropped waveform.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!