简体   繁体   English

Naudio-多个声音设备的播放和录制问题

[英]Naudio- Multiple sound device playback and recording issue

i am using WaveOut and WaveInEvent to record sound from multiple usb sound devices and playing it back to them. 我正在使用WaveOut和WaveInEvent记录来自多个USB声音设备的声音并将其播放回去。 i am talking about 4-6 external usb sound cards that i have to record and playback at the same time all together. 我说的是4-6个外部USB声卡,我必须同时记录和回放。

so it means that for every sound device i have one object of WaveOut with the soundDevice ID and one object of WaveInEvent with the same SoundDevice ID (for record&playback). 因此,这意味着对于每个声音设备,我都有一个带有soundDevice ID的WaveOut对象和一个具有相同SoundDevice ID(用于记录和播放)的WaveInEvent对象。

my c# project throws mmexeption with explanation :"unspecified problem" when i am calling to the WaveInEvent.startRecording(). 当我调用WaveInEvent.startRecording()时,我的C#项目抛出mmexeption并带有解释:“未指定的问题”。 sometime it happens in the init of the WaveOut with the stream. 有时会在WaveOut的初始化中随流发生。

i thought that maybe there is a limitation of opening sound card devices for play&record or maybe naudio cant support it. 我认为打开声卡设备进行播放和录制可能存在限制,或者naudio无法支持它。

so is the limitation exist? 那么限制存在吗? or maybe i have to use diffrent object then WaveOut and WaveInEvent when handling multiple sound card device? 还是在处理多个声卡设备时必须使用不同的对象,然后使用WaveOut和WaveInEvent?

tried to play on all devices from Winamp and when I got to the forth sound card it didn't play. 试图在Winamp的所有设备上播放,但是当我到达第四张声卡时,它没有播放。

I tried to plug one sound card to a different USB hub of the pc (not different port at the same hub, a new port on a different hub) and suddenly it works! 我试图将一个声卡插入PC的另一个USB集线器(在同一集线器上没有不同的端口,在另一个集线器上没有新的端口),然后突然起作用了! also with Naudio. 还有Naudio。 now i can open all of them to playback and record. 现在,我可以打开所有这些文件进行播放和录制。 I haven't tried massive check yet but its looking good. 我还没有尝试过大量检查,但是看起来不错。

it's seems like that the problem was that I overloaded the usb hub. 看来问题是我使USB集线器超载。 I don't know if it because the usb hub doesn't has enough bandwidth or because something that belongs to voltage issue. 我不知道是否是因为USB集线器没有足够的带宽或因为属于电压问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM