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); }
private static extern void pa_channel_map_init_mono(ref ChannelMap map);
public void MonoMapHasOneChannel() { ChannelMap map = ChannelMap.MonoMapping(); Assert.AreEqual(1, map.channels); }
public void StereoMapHasTwoChannels() { ChannelMap map = ChannelMap.StereoMapping(); Assert.AreEqual(2, map.channels); }