From: rpo p on 8 Apr 2010 08:50 Hello, I have *.raw audio files and I need to open them in matlab, how can I do so? Thanks for any help. Royi
From: Walter Roberson on 8 Apr 2010 09:34 rpo p wrote: > I have *.raw audio files and I need to open them in matlab, how can I do > so? FID = fopen(FileName,'r'); if FID < 0 error('Failed to open file'); end I suspect, though, that you want to do more than just open them, and want to read the content ;-) You can use fread() for that, but you need to know the binary format that the samples are stored in. I've seen .raw files used for 8 bit unsigned integer samples, 16 bit signed and unsigned integer samples, 32 bit signed and unsigned integer samples, 32 bit fixed point samples, 32 bit floating point samples, 10 and 12 and 14 bit samples packed in various ways into 16 bits. And even 8 bit u-law and m-law encoded samples (yeah, I know using an encoding contradicts the extension .raw, but it was on a system on which the sound hardware itself took u-law encoded samples.)
|
Pages: 1 Prev: simulated annealing Next: how to check extension of an image file |