[Stk] *.wav file that FileRead can open

Rich M rmarsch at bu.edu
Sat Mar 14 11:48:07 PDT 2009


Weird, I just tried the WEBER2.WAV from that site and got the following 
error:
FileRead: weber2.wav contains an unsupported data format type <256>.

Any suggestions?

-Rich

Emile Vrijdags wrote:
> I've been using samples from
>
> http://pcfarina.eng.unipr.it/Public/Aurora_CD/Anecoic/Farina/
>
> they work for me. (Make sure your path is right, source is available, 
> use debugger to step into code to check where it goes wrong)
>
> I've used WaveLoop to open the file, like this (some extracted lines 
> of code):
>
> const char* const TEST_WAVE_FILE = "../res/anechoic samples/ALEOTTI.WAV";
> WaveLoop* m_waveLoop;
> m_waveLoop = new WaveLoop(TEST_WAVE_FILE);
>
>
>
> Rich M schreef, Op 2/03/2009 22:14:
>> Hi,
>> I have a c++ project using STK and Real-Time Audio in which I open a 
>> 44.1kHz interleaved 32bit float 2 channel WAVE file. I created this 
>> .wav file in Cubase 3 SX. When I run my program I get this error:
>> FileRead: error reading WAV file <GuitarDelayTest2.wav>.
>>
>> Included after e-mail is related code.
>>
>> I'm not really sure where to go from this error, since I don't know 
>> what the problem is... Perhaps even the best solution is if someone 
>> could give me a .wav file that FileRead can open, all I need to do is 
>> get this program to actually run. I'm doing this for a directed study 
>> at University and my adviser doesn't care what the sound clip is, as 
>> long as I can make my program play it and process it through a few 
>> delay units I coded.
>>
>> Thanks,
>> Rich
>>
>> When prompted in main I enter: GuitarDelayTest2.wav
>> the name of the filename I want to open, which is found in the same 
>> directory as the *.exe file for my program
>>
>> //This is the function i use to open the input
>>
>> bool AudioHandler::openInput(std::string file){
>>    //if .wav is found to be the extension format
>>    if(file.find(".wav", 0) == std::string::npos){
>>        cout << "\nInvalid file type. Please try again.\n";
>>        return false;
>>    }
>>    else{
>>        try{
>>            this->input.openFile(file);
>>        }
>>        catch( StkError & ) {
>>            cout << "\nInput file did not open correctly.\n";
>>            exit(1);
>>        }
>>        return true;
>>    }
>> }
>>
>>
>> //This is the section of main that runs before I get my Stk Error
>> int main(){
>>     AudioHandler audio;
>>     std::string fileName = "";
>>
>>     cout << "This is the console version of the Digital Delay Unit 
>> with 3 Delays Implemented by Richard Marscher." << endl;
>>     cout << "This program uses the Real Time Audio and Synthesis Tool 
>> Kit Native C++ libraries for audio file manipulation." << endl;
>>     cout << "This program expects to recieve a two-channel 
>> interleaved 44.1kHz (non 24-bit) .wav file for processing." << endl;
>>     cout << "This program currently only supports WINDOWS and only 
>> supports the audio drivers ASIO or DirectSound." << endl;
>>     cout << "The program will then prompt the user to select a 
>> digital delay type to process the audio file with." << endl;
>>     cout << "There are three delays: Single delay, Double delay, and 
>> Feedback delay." << endl;
>>     cout << "Once a delay is selected, the settings of the delay must 
>> be defined by the user." << endl;
>>     cout << "Once defined, the program will playback the audio file 
>> through the corresponding delay unit." << endl << endl << endl;
>>
>>
>>     bool driverChoice;
>>     cout << "Enter 1 to use ASIO, 0 to use DirectSound preprocessor 
>> definitions: ";
>>     cin >> driverChoice;
>>     audio.setDriver(driverChoice);
>>
>>     do{
>>        cout << "\n\nEnter the filename of a two-channel interleaved 
>> 44.1kHz .wav file to open for processing: ";
>>         cin >> fileName;
>>         cout << endl << fileName;
>>     }while(!audio.openInput(fileName)); //Call the function to open 
>> the input file to a FileWvIn object. 
>> Repeat                                 
>>                                   //until valid file entered
>> }
>>
>> _______________________________________________
>> Stk mailing list
>> Stk at ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>
>>   
>
>



More information about the Stk mailing list