Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[18.119.104.238] |
|
Сообщ.
#1
,
|
|
|
Добрый вечер!
Создал свой простенький фильтр DirectShow(на самом деле адаптировал фильтр из примеров SDK ) - на основе DUMP.Подключил его к выходу микрофона - вижу, что метод Receive входного pin-a вызывается прибл. 2 разар в секунд. Вопрос: каким образом вообще регулируется частота поступления данных на мой фильтр ? Т.е. может ли он попросить выдавать данные, например, 10 раз в секунду меньшими порциями ? |
Сообщ.
#2
,
|
|
|
https://docs.microsoft.com/en-us/windows/wi...ture-properties
Цитата The Audio Capture Filter also exposes the IAMBufferNegotiation interface. This interface is useful for controlling the amount of latency in audio preview. By default, the Audio Capture filter uses a half-second buffer size. This buffer size is optimal for capturing but causes a half-second preview delay. To reduce the latency, call the IAMBufferNegotiation::SuggestAllocatorProperties method before you connect the Audio Capture Filter's output pin. This method takes a pointer to the ALLOCATOR_PROPERTIES structure. Use the cbBuffer member to specify the buffer size, in bytes. An 80 millisecond buffer is generally safe, but buffers of 30 or 40 milliseconds might be sufficient. If the buffers are too small, the sound quality will be degraded. |