i just want to ask why it wont play in another device. This code play no problem with a china based Device, i tried korean and it shows the error.(iStation PMP WincE5.0)
private void InitWavHeader(){
FFileStream = new FileStream(FFileName,FileMode.Create,FileAccess.Write);
FBinaryWriter = new BinaryWriter(FFileStream);
FBinaryWriter.Write(new char[4] { 'R', 'I', 'F', 'F' });
FBinaryWriter.Write((int)36); //Chunksize
FBinaryWriter.Write(new char[8] {'W','A','V','E','f','m','t',' '}); //format
FBinaryWriter.Write((int)16); // SubChunk1Size : 16 for PCM
FBinaryWriter.Write((short)1); //AudioFormat: 1 for PCM
FBinaryWriter.Write((short)1); // NumChannels: 1 for Mono, 2 for Stereo
FBinaryWriter.Write((int)22050); //Sample Rate
FBinaryWriter.Write((int)88200); //Byte Rate
FBinaryWriter.Write((short)2); //Block Align
FBinaryWriter.Write((short)16); // Bits per Sample
FBinaryWriter.Write(new char[4]{'d','a','t','a'});
FBinaryWriter.Write((int)0); //Data Length: Initialize length to 0;
}
recordStream = Bass.BASS_RecordStart(22050, 1, BASSFlag.BASS_RECORD_PAUSE, myRecordProc, IntPtr.Zero);
i checked the error code after the call and it returned BASS_ERROR_FORMAT