示例#1
0
        /// <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;
        }
示例#2
0
        /// <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;
        }
        /// <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;
        }