public WaveFileObuffer(int number_of_channels, int freq, System.IO.Stream stream) { InitBlock(); buffer = new short[OBUFFERSIZE]; bufferp = new short[MAXCHANNELS]; channels = number_of_channels; for (int i = 0; i < number_of_channels; ++i) bufferp[i] = (short) i; outWave = new WaveFile(); int rc = outWave.OpenForWrite(null, stream, freq, (short) 16, (short) channels); }
/// <summary> Creates a new WareFileObuffer instance. /// /// </summary> /// <param name="">number_of_channels /// The number of channels of audio data /// this buffer will receive. /// /// </param> /// <param name="freq The">sample frequency of the samples in the buffer. /// /// </param> /// <param name="fileName The">filename to write the data to. /// /// </param> public WaveFileObuffer(int number_of_channels, int freq, System.String FileName) { InitBlock(); if (FileName == null) throw new System.NullReferenceException("FileName"); buffer = new short[OBUFFERSIZE]; bufferp = new short[MAXCHANNELS]; channels = number_of_channels; for (int i = 0; i < number_of_channels; ++i) bufferp[i] = (short) i; outWave = new WaveFile(); int rc = outWave.OpenForWrite(FileName, null, freq, (short) 16, (short) channels); }
private void InitBlock(WaveFile enclosingInstance) { this.enclosingInstance = enclosingInstance; }
/// <summary> Open for write using another wave file's parameters... /// </summary> public virtual int OpenForWrite(System.String Filename, WaveFile OtherWave) { return(OpenForWrite(Filename, null, OtherWave.SamplingRate(), OtherWave.BitsPerSample(), OtherWave.NumChannels())); }
public WaveFormat_ChunkData(WaveFile enclosingInstance) { InitBlock(enclosingInstance); wFormatTag = 1; // PCM Config(44100, (short)16, (short)1); }
public WaveFileSample(WaveFile enclosingInstance) { InitBlock(enclosingInstance); chan = new short[WaveFile.MAX_WAVE_CHANNELS]; }
public WaveFormat_ChunkData(WaveFile enclosingInstance) { InitBlock(enclosingInstance); wFormatTag = 1; // PCM Config(44100, (short) 16, (short) 1); }
public WaveFormat_Chunk(WaveFile enclosingInstance) { InitBlock(enclosingInstance); header = new RiffChunkHeader(enclosingInstance); data = new WaveFormat_ChunkData(enclosingInstance); header.ckID = javazoom.jl.converter.RiffFile.FourCC("fmt "); header.ckSize = 16; }
/// <summary> Open for write using another wave file's parameters... /// </summary> public virtual int OpenForWrite(System.String Filename, WaveFile OtherWave) { return OpenForWrite(Filename, null, OtherWave.SamplingRate(), OtherWave.BitsPerSample(), OtherWave.NumChannels()); }