Hi, I was looking to develop a code strip the header details in the .wav file & convert it into a .dat file. I have the C code which does this in VC++, which runs well. But since the data types in VDSP++ are all 4 bytes, I cannot read the data in a .wav file byte by byte. Do you have a code which works in VDSP++ (converting .wav to .dat)? Can u suggest something?
ADSP 21161N EZKIT Lite ( VDSP++ 3.5)
Started by ●May 27, 2004
Reply by ●May 27, 20042004-05-27
g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0405270838.3a0b5f8d@posting.google.com>...> Hi, > I was looking to develop a code strip the header details in the .wav > file & convert it into a .dat file. I have the C code which does this > in VC++, which runs well. But since the data types in VDSP++ are all 4 > bytes, I cannot read the data in a .wav file byte by byte. > Do you have a code which works in VDSP++ (converting .wav to .dat)? > Can u suggest something?Have you tried some way of initializing a buffer with the floating point data in your .dat file? Of course, have a look at the documentation about how to do it (I don't recall it at the moment) JaaC
Reply by ●June 3, 20042004-06-03
The problem I am facing is that VDSP++ 3.5 doesnot support any datatype with 1 byte width. But the .wav file has the data (byte by byte) after the header. Hence, even though I can read the number of data bytes in the .wav file, I cannot read data as it is. I can read 4 bytes at a time only. Thanks for any suggestions. jaime.aranguren@ieee.org (Jaime Andres Aranguren Cardona) wrote in message news:<14a86f87.0405271610.778f5999@posting.google.com>...> g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0405270838.3a0b5f8d@posting.google.com>... > > Hi, > > I was looking to develop a code strip the header details in the .wav > > file & convert it into a .dat file. I have the C code which does this > > in VC++, which runs well. But since the data types in VDSP++ are all 4 > > bytes, I cannot read the data in a .wav file byte by byte. > > Do you have a code which works in VDSP++ (converting .wav to .dat)? > > Can u suggest something? > > Have you tried some way of initializing a buffer with the floating > point data in your .dat file? Of course, have a look at the > documentation about how to do it (I don't recall it at the moment) > > JaaC
Reply by ●June 3, 20042004-06-03
The problem I am facing is that VDSP++ 3.5 doesnot support any datatype with 1 byte width. But the .wav file has the data (byte by byte) after the header. Hence, even though I can read the number of data bytes in the .wav file, I cannot read data as it is. I can read 4 bytes at a time only. Thanks for any suggestions. jaime.aranguren@ieee.org (Jaime Andres Aranguren Cardona) wrote in message news:<14a86f87.0405271610.778f5999@posting.google.com>...> g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0405270838.3a0b5f8d@posting.google.com>... > > Hi, > > I was looking to develop a code strip the header details in the .wav > > file & convert it into a .dat file. I have the C code which does this > > in VC++, which runs well. But since the data types in VDSP++ are all 4 > > bytes, I cannot read the data in a .wav file byte by byte. > > Do you have a code which works in VDSP++ (converting .wav to .dat)? > > Can u suggest something? > > Have you tried some way of initializing a buffer with the floating > point data in your .dat file? Of course, have a look at the > documentation about how to do it (I don't recall it at the moment) > > JaaC
Reply by ●June 3, 20042004-06-03
Hi, The problem eixsts in the fact that there is no datatype which is 1 byte wide in VDSP++. The .wav file has data byte after byte after the header( 44 bytes wide). Although, I have been able to read the number of data bytes in the .wav file reading the header info, I have not been able to read data properly. I can only read 4 bytes of data at a time. Thanks for any suggestions. jaime.aranguren@ieee.org (Jaime Andres Aranguren Cardona) wrote in message news:<14a86f87.0405271610.778f5999@posting.google.com>...> g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0405270838.3a0b5f8d@posting.google.com>... > > Hi, > > I was looking to develop a code strip the header details in the .wav > > file & convert it into a .dat file. I have the C code which does this > > in VC++, which runs well. But since the data types in VDSP++ are all 4 > > bytes, I cannot read the data in a .wav file byte by byte. > > Do you have a code which works in VDSP++ (converting .wav to .dat)? > > Can u suggest something? > > Have you tried some way of initializing a buffer with the floating > point data in your .dat file? Of course, have a look at the > documentation about how to do it (I don't recall it at the moment) > > JaaC
Reply by ●June 3, 20042004-06-03
g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0406030702.682a0cfd@posting.google.com>...> The problem I am facing is that VDSP++ 3.5 doesnot support any > datatype with 1 byte width. But the .wav file has the data (byte by > byte) after the header. Hence, even though I can read the number of > data bytes in the .wav file, I cannot read data as it is. I can read 4 > bytes at a time only. > Thanks for any suggestions. > > jaime.aranguren@ieee.org (Jaime Andres Aranguren Cardona) wrote in message news:<14a86f87.0405271610.778f5999@posting.google.com>... > > g_rprabhakar@umassd.edu (Rashmi P) wrote in message news:<77fb333d.0405270838.3a0b5f8d@posting.google.com>... > > > Hi, > > > I was looking to develop a code strip the header details in the .wav > > > file & convert it into a .dat file. I have the C code which does this > > > in VC++, which runs well. But since the data types in VDSP++ are all 4 > > > bytes, I cannot read the data in a .wav file byte by byte. > > > Do you have a code which works in VDSP++ (converting .wav to .dat)? > > > Can u suggest something? > > > > Have you tried some way of initializing a buffer with the floating > > point data in your .dat file? Of course, have a look at the > > documentation about how to do it (I don't recall it at the moment) > > > > JaaCWhy don't you just use your utility to convert all of your .wav file into .dat, and then read the .dat into VDSP++? JaaC
Reply by ●June 4, 20042004-06-04
Rashmi P wrote:> Hi, > The problem eixsts in the fact that there is no datatype which is 1 > byte wide in VDSP++. The .wav file has data byte after byte after the > header( 44 bytes wide). Although, I have been able to read the number > of data bytes in the .wav file reading the header info, I have not > been able to read data properly. I can only read 4 bytes of data at a > time. > Thanks for any suggestions.Is there some reason why you can't read 32 bits, then shift and mask to isolate the bits you want? ... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������