Exemple #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);
        }
Exemple #2
0
        public void BytesPerSecondForStereo48000HzFloat32()
        {
            SampleSpec spec = new SampleSpec()
            {
                channels = 2,
                format   = SampleFormat.Float32LE,
                rate     = 48000
            };

            Assert.AreEqual(48000 * 4 * 2, spec.BytesPerSecond);
        }
        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);
        }
Exemple #4
0
 private static extern UIntPtr pa_bytes_per_second(ref SampleSpec spec);