- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 DirectSoundFullDuplexCreate8 进行录制,并且在某些情况下,在 Win 7 下播放。我有几个问题。
一个非常简单——FullDuplex 可以与所有音频硬件一起使用吗?在某些情况下,我们将使用不同的设备进行录制和播放。到目前为止,这似乎可行,但如果有机器不支持全双工的 Win 版本,我们可以自己推出。
另一个可能是一个愚蠢的问题,但我看不到如何设置事件通知进行记录。这是我到目前为止的代码,但我不知道如何开始录制或如何设置,以便我可以将正在录制的数据复制到其他缓冲区,包括播放缓冲区:
hr = DirectSoundFullDuplexCreate8((LPCGUID)recordDeviceDS, (LPCGUID)playbackDeviceDS&capBufferDescription, &playBufferDescription, hWnd, DSSCL_PRIORITY, &pDSFullDuplex, &pDSCaptureBuffer8, &pDSPlayBuffer8, NULL );
if (hr != DS_OK)
return false;
// Set up the notify events
hr = pDSCaptureBuffer8->QueryInterface(IID_IDirectSoundNotify, (LPVOID*)&pDSNotify);
if (hr != DS_OK)
return false;
for (int i = 0; i < 3; ++i)
{
eventHandles[i] = CreateEvent(NULL, TRUE, FALSE, NULL);
if (eventHandles[i] == NULL)
return false;
}
notifyEvents[0].dwOffset = 500;
notifyEvents[0].hEventNotify = eventHandles[0];
notifyEvents[1].dwOffset = 1000;
notifyEvents[1].hEventNotify = eventHandles[1];
notifyEvents[2].dwOffset = DSBPN_OFFSETSTOP;
notifyEvents[2].hEventNotify = eventHandles[2];
hr = pDSNotify->SetNotificationPositions(NUM_CAP_EVENTS, notifyEvents);
if (hr != DS_OK)
return false;
pDSNotify->Release();
pDSCaptureBuffer8->Start(true);
最佳答案
欢迎来到 StackOverflow。为了将来引用,最好一次问一个精确的问题。
One is very simple- will FullDuplex work with all audio hardware?
Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista.
but I don't see how to set up event notifications for recording. Here's the code I've got so far, but I don't see how to start recording or how to set things up so that I can copy the data being recorded to other buffers, including playback buffers:
关于windows - 关于DirectSoundFullDuplexCreate8的两个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14018242/
我是一名优秀的程序员,十分优秀!