Exemple #1
0
        public static ChannelMap MonoMapping()
        {
            ChannelMap mapping = new ChannelMap();

            mapping.Init();
            pa_channel_map_init_mono(ref mapping);
            return(mapping);
        }
        public void DefaultChannelFormatIsStereo()
        {
            Context c = new Context();

            c.ConnectAndWait();
            ServerInfo info = new ServerInfo(new NativeServerInfo());

            using (Operation o = c.GetServerInfo((ServerInfo i) => info = i)) {
                o.Wait();
            }
            Assert.AreEqual(ChannelMap.StereoMapping().channels, info.DefaultChannelMap.channels);
        }
        public void SinkChannelMapPropertyReturnsCopy()
        {
            Context c = new Context();

            c.ConnectAndWait();

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

            ChannelMap sinkMap = addedSink.ChannelMap;

            sinkMap.channels++;
            Assert.AreNotEqual(addedSink.ChannelMap.channels, sinkMap.channels);
        }
Exemple #4
0
 private static extern void pa_channel_map_init_mono(ref ChannelMap map);
Exemple #5
0
        public void MonoMapHasOneChannel()
        {
            ChannelMap map = ChannelMap.MonoMapping();

            Assert.AreEqual(1, map.channels);
        }
Exemple #6
0
        public void StereoMapHasTwoChannels()
        {
            ChannelMap map = ChannelMap.StereoMapping();

            Assert.AreEqual(2, map.channels);
        }