本文整理汇总了C#中IAudioSource类的典型用法代码示例。如果您正苦于以下问题:C# IAudioSource类的具体用法?C# IAudioSource怎么用?C# IAudioSource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAudioSource类属于命名空间,在下文中一共展示了IAudioSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTalkTarget
public static ITalkTarget GetTalkTarget(objectsCamera cam, IAudioSource source)
{
ITalkTarget talkTarget;
switch (cam.settings.audiomodel)
{
default://local playback
talkTarget = new TalkLocal(source);
break;
case "Foscam":
talkTarget = new TalkFoscam(cam.settings.audioip, cam.settings.audioport,
cam.settings.audiousername, cam.settings.audiopassword, source);
break;
case "iSpyServer":
talkTarget = new TalkiSpyServer(cam.settings.audioip, cam.settings.audioport,
source);
break;
case "NetworkKinect":
talkTarget = new TalkNetworkKinect(cam.settings.audioip, cam.settings.audioport,
source);
break;
case "Axis":
talkTarget = new TalkAxis(cam.settings.audioip, cam.settings.audioport,
cam.settings.audiousername, cam.settings.audiopassword, source);
break;
case "IP Webcam (Android)":
talkTarget = new TalkIPWebcamAndroid(new Uri(cam.settings.videosourcestring), source);
break;
}
return talkTarget;
}
示例2: RemoteFlacEncoder
public RemoteFlacEncoder(IPAddress remoteAddress, IAudioSource audioSource, string targetFilename, AudioFileTag tags, int compressionLevel, TrackGain trackGain, DrMeter drMeter)
: base(audioSource, targetFilename, tags, trackGain, drMeter)
{
this.AudioDest = new RemoteFlacWriter(remoteAddress, targetFilename, audioSource.PCM)
{
CompressionLevel = compressionLevel
};
}
示例3: LocalMp3Encoder
public LocalMp3Encoder(IAudioSource audioSource, string targetFilename, AudioFileTag tags, int vbrQuality, TrackGain trackGain, DrMeter drMeter)
: base(audioSource, targetFilename, tags, trackGain, drMeter)
{
this.AudioDest = new LameWriter(targetFilename, audioSource.PCM)
{
Settings = LameWriterSettings.CreateVbr(vbrQuality)
};
}
示例4: CueToolsFlacEncoder
public CueToolsFlacEncoder(IAudioSource audioSource, string targetFilename, AudioFileTag tags, int compressionLevel, TrackGain trackGain, DrMeter drMeter)
: base(audioSource, targetFilename, tags, trackGain, drMeter)
{
this.AudioDest = new FLACWriter(targetFilename, audioSource.PCM)
{
CompressionLevel = compressionLevel
};
}
示例5: TalkAxis
public TalkAxis(string server, int port, string username, string password, IAudioSource audioSource)
{
_server = server;
_port = port;
_audioSource = audioSource;
_username = username;
_password = password;
}
示例6: CreateTrackGain
public static TrackGain CreateTrackGain(IAudioSource audioSource)
{
if (audioSource != null && ReplayGain.IsSupportedFormat(audioSource.PCM.SampleRate, audioSource.PCM.BitsPerSample))
{
return new TrackGain(audioSource.PCM.SampleRate, audioSource.PCM.BitsPerSample);
}
return null;
}
示例7: RemoteMp3VbrEncoder
public RemoteMp3VbrEncoder(IPAddress remoteAddress, IAudioSource audioSource, string targetFilename, AudioFileTag tags, int vbrQuality, TrackGain trackGain, DrMeter drMeter)
: base(audioSource, targetFilename, tags, trackGain, drMeter)
{
this.AudioDest = new RemoteMp3VbrWriter(remoteAddress, targetFilename, audioSource.PCM)
{
CompressionLevel = vbrQuality
};
}
示例8: AddInputOutputSource
/// <summary>
/// Adds a source/sink combination to this muxer
/// </summary>
/// <param name="source"></param>
/// <param name="sink"></param>
public PushPullObject AddInputOutputSource(IAudioSource source, IAudioSink sink)
{
PushPullObject member = new PushPullObject(source, sink);
lock (MemberLock)
{
Members.Add(member);
}
return member;
}
示例9: AudioPipe
public AudioPipe(IAudioSource source, int size, bool own, ThreadPriority priority)
: this(source.PCM, size)
{
this.own = own;
this.priority = priority;
_source = source;
_sampleLen = _source.Length;
_samplePos = _source.Position;
}
示例10: TestableExample
public TestableExample(TestableGameObject parent,
IAudioSource source,
Sphere sphere,
[Resource("audio/beep")] AudioClip beep)
: base(parent)
{
this.source = source;
this.beep = beep;
this.Obj.transform.localScale = new Vector3(5, 5, 5);
}
示例11: FileEncoderBase
public FileEncoderBase(IAudioSource audioSource, string targetFilename, AudioFileTag tags, TrackGain trackGain, DrMeter drMeter)
{
if (audioSource == null)
{
throw new SkipEncodingItemException("Unsupported audio source.");
}
this.targetFilename = targetFilename;
this.audioSource = audioSource;
Directory.CreateDirectory(Path.GetDirectoryName(this.targetFilename));
this.tags = tags;
this.trackGain = trackGain;
this.drMeter = drMeter;
}
示例12: LossyWAVReader
public LossyWAVReader(IAudioSource audioSource, IAudioSource lwcdfSource)
{
_audioSource = audioSource;
_lwcdfSource = lwcdfSource;
if (_audioSource.Length != _lwcdfSource.Length)
throw new Exception("Data not same length");
if (_audioSource.PCM.BitsPerSample != _lwcdfSource.PCM.BitsPerSample
|| _audioSource.PCM.ChannelCount != _lwcdfSource.PCM.ChannelCount
|| _audioSource.PCM.SampleRate != _lwcdfSource.PCM.SampleRate)
throw new Exception("FMT Data mismatch");
scaling_factor = 1.0; // !!!! Need to read 'fact' chunks or tags here
}
示例13: CreateEncoderInternal
protected override IEncoder CreateEncoderInternal(int threadNumber, FileEncodeTask task, IAudioSource audioSource)
{
if (threadNumber < this.localConcurrency)
{
return new LocalMp3Encoder(audioSource, task.TargetFilename, task.Tag, vbrQuality, task.TrackGain, task.DrMeter);
}
threadNumber -= Environment.ProcessorCount;
foreach (DiscoveryServerDescriptor server in this.servers)
{
if (threadNumber < server.ThreadCount)
{
return new RemoteMp3VbrEncoder(server.Address, audioSource, task.TargetFilename, task.Tag, this.vbrQuality, task.TrackGain, task.DrMeter);
}
threadNumber -= server.ThreadCount;
}
throw new ArgumentException("threadNumber is too large.");
}
示例14: CreateEncoderInternal
protected override IEncoder CreateEncoderInternal(int threadNumber, FileEncodeTask task, IAudioSource audioSource)
{
if (threadNumber < this.concurrencylevel)
{
return new NativeFlacEncoder(audioSource, task.TargetFilename, task.Tag, compressionLevel, task.TrackGain, task.DrMeter);
}
threadNumber -= this.concurrencylevel;
foreach (DiscoveryServerDescriptor server in this.servers)
{
if (threadNumber < server.ThreadCount)
{
return new RemoteFlacEncoder(server.Address, audioSource, task.TargetFilename, task.Tag, this.compressionLevel, task.TrackGain, task.DrMeter);
}
threadNumber -= server.ThreadCount;
}
throw new ArgumentException("threadNumber is too large.");
}
示例15: RemoveInputOutputSource
public void RemoveInputOutputSource(IAudioSource source, IAudioSink sink)
{
lock (MemberLock)
{
PushPullObject removeobject = null;
foreach (PushPullObject ppo in Members)
{
if ((ppo.AudioSource == source) && (ppo.AudioSink == sink))
{
removeobject = ppo;
break;
}
}
if (removeobject != null)
{
Members.Remove(removeobject);
}
}
}