Class allowing WaveFormat Access
Inheritance: RiffFile
Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 private void  InitBlock(WaveFile enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Exemplo n.º 4
0
 /// <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()));
 }
Exemplo n.º 5
0
 public WaveFormat_ChunkData(WaveFile enclosingInstance)
 {
     InitBlock(enclosingInstance);
     wFormatTag = 1;                 // PCM
     Config(44100, (short)16, (short)1);
 }
Exemplo n.º 6
0
 public WaveFileSample(WaveFile enclosingInstance)
 {
     InitBlock(enclosingInstance);
     chan = new short[WaveFile.MAX_WAVE_CHANNELS];
 }
Exemplo n.º 7
0
 private void InitBlock(WaveFile enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Exemplo n.º 8
0
 public WaveFormat_ChunkData(WaveFile enclosingInstance)
 {
     InitBlock(enclosingInstance);
     wFormatTag = 1; // PCM
     Config(44100, (short) 16, (short) 1);
 }
Exemplo n.º 9
0
 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;
 }
Exemplo n.º 10
0
 public WaveFileSample(WaveFile enclosingInstance)
 {
     InitBlock(enclosingInstance);
     chan = new short[WaveFile.MAX_WAVE_CHANNELS];
 }
Exemplo n.º 11
0
 /// <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());
 }