예제 #1
0
        public void BytesPerSecondForMono44100HzS16()
        {
            SampleSpec spec = new SampleSpec();

            spec.channels = 1;
            spec.format   = SampleFormat.S16LE;
            spec.rate     = 44100;
            Assert.AreEqual(44100 * 1 * 2, spec.BytesPerSecond);
        }
예제 #2
0
        public void BytesPerSecondForStereo48000HzFloat32()
        {
            SampleSpec spec = new SampleSpec()
            {
                channels = 2,
                format   = SampleFormat.Float32LE,
                rate     = 48000
            };

            Assert.AreEqual(48000 * 4 * 2, spec.BytesPerSecond);
        }
예제 #3
0
        public void SinkSampleMapPropertyReturnsCopy()
        {
            Context c = new Context();

            c.ConnectAndWait();

            Sink addedSink = helper.AddSink(c, "SampleMapHelpTestSink");

            SampleSpec sinkSample = addedSink.SampleSpec;

            sinkSample.rate++;
            Assert.AreNotEqual(addedSink.SampleSpec.rate, sinkSample.rate);
        }
예제 #4
0
 private static extern UIntPtr pa_bytes_per_second(ref SampleSpec spec);