/// <summary> /// PCMデータの形式を設定する。 /// </summary> public void SetFormat( int numChannels, int bitsPerSample, int validBitsPerSample, int sampleRate, ValueRepresentationType sampleValueRepresentation, long numFrames) { NumChannels = numChannels; BitsPerSample = bitsPerSample; ValidBitsPerSample = validBitsPerSample; SampleRate = sampleRate; SampleValueRepresentationType = sampleValueRepresentation; mNumFrames = numFrames; if (SampleDataType == PcmDataLib.PcmData.DataType.DoP) { BitRate = SampleRate * numChannels * 16; } else { BitRate = SampleRate * numChannels * validBitsPerSample; } mSampleLargeArray = null; IsLossyCompressed = false; }
/// <summary> /// PCMデータの形式を設定する。 /// </summary> public void SetFormat( int numChannels, int bitsPerSample, int validBitsPerSample, int sampleRate, ValueRepresentationType sampleValueRepresentation, long numFrames) { NumChannels = numChannels; BitsPerSample = bitsPerSample; ValidBitsPerSample = validBitsPerSample; SampleRate = sampleRate; SampleValueRepresentationType = sampleValueRepresentation; mNumFrames = numFrames; mSampleArray = null; }