Сделал пример, в котором правильным наоборот считается LOOPING интерфейс, и будет искаться именно он. Возможно, теперь заработают другие драйвера.
Вид для печати
Сделал пример, в котором правильным наоборот считается LOOPING интерфейс, и будет искаться именно он. Возможно, теперь заработают другие драйвера.
Как то оно так...
Цитата:
0.500: Entering RenderThreadProc
0.513: Device found
0.514: Pin 0: Communication type = 1
0.515: Total 7 DataRanges
0.515: Interface GUID {1A8766A0-62CE-11CF-A5}
0.516: Interfice ID 1
0.516: Found SINK IN Pin, id = 0, hr = 0
0.516: Pin 1: Communication type = 0
0.517: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.518: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rearlineoutwave3
0.520: Pin 0: Communication type = 1
0.521: Total 6 DataRanges
0.521: Interface GUID {1A8766A0-62CE-11CF-A5}
0.521: Interfice ID 1
0.522: Found SINK IN Pin, id = 0, hr = 0
0.522: Pin 1: Communication type = 0
0.522: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.522: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifoptwave
0.523: Pin 0: Communication type = 1
0.524: Total 6 DataRanges
0.524: Interface GUID {1A8766A0-62CE-11CF-A5}
0.524: Interfice ID 1
0.525: Found SINK IN Pin, id = 0, hr = 0
0.525: Pin 1: Communication type = 0
0.525: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.526: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifwave
0.528: All devices enumerated
0.531: Filters enumerated
0.532: Filter for rendering is avaliable
0.532: Total 3 filters
0.532: No pins available for rendering
0.533: Leaving RenderThreadProc
Как мне узнать, есть ли дополнительные кнопки? Вроде никак.
Я беру, узнаю ширины основных 3-х кнопок, и рисую к ним вплотную индикатор.
---------- Post added at 23:25 ---------- Previous post was at 23:23 ----------
Отлично, теперь эти три устройства опознались, как выводящие, но почему-то остановка на 0.532: No pins available for rendering.
---------- Post added at 23:26 ---------- Previous post was at 23:25 ----------
Теперь опознался линейный выход, и судя по логу идет в него вывод. Звук слышен?
Добавил больше инфо для тех, у кого затыкается на 'No pins available for rendering'.
:v2_dizzy_keyboard:
Цитата:
0.500: Entering RenderThreadProc
0.506: Device found
0.507: Pin 0: Communication type = 1
0.507: Total 7 DataRanges
0.508: Interface GUID {1A8766A0-62CE-11CF-A5}
0.508: Interfice ID 1
0.508: Found SINK IN Pin, id = 0, hr = 0
0.508: Pin 1: Communication type = 0
0.509: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.510: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rearlineoutwave3
0.511: Pin 0: Communication type = 1
0.511: Total 6 DataRanges
0.511: Interface GUID {1A8766A0-62CE-11CF-A5}
0.511: Interfice ID 1
0.512: Found SINK IN Pin, id = 0, hr = 0
0.512: Pin 1: Communication type = 0
0.512: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.512: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifoptwave
0.513: Pin 0: Communication type = 1
0.513: Total 6 DataRanges
0.513: Interface GUID {1A8766A0-62CE-11CF-A5}
0.513: Interfice ID 1
0.513: Found SINK IN Pin, id = 0, hr = 0
0.514: Pin 1: Communication type = 0
0.514: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.515: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifwave
0.517: All devices enumerated
0.519: Filters enumerated
0.519: Filter for rendering is avaliable
0.519: Total 3 filters
0.519: Try WAVEFORMATEXTENSIBLE format
0.520: Failed to instantiate Render Pin
0.520: Try WAVEFORMATEX format
0.520: Failed to instantiate Render Pin
0.520: No pins available for rendering
0.521: Leaving RenderThreadProc
Все понятно.
Не смотря на то, что теперь выбираются устройства, поддерживающие только циклическое воспроизведение, но при инициализации пина по старинке выбирался нециклический метод. Сейчас принудительно поставил циклический, и должно заработать у тех, у кого писало ошибку.
Другое дело, что в таком режиме, судя по всему, позиция внутри буфера считается несколько иначе, поэтому я сделал тройной рассчет друг за другом, дабы примерно понять шаг.
Ну что-то есть…
Код:0.502: Entering RenderThreadProc
0.503: Device found
0.504: Pin 0: Communication type = 1
0.505: Total 3 DataRanges
0.505: Interface GUID {1A8766A0-62CE-11CF-A5}
0.506: Interfice ID 1
0.506: Found SINK IN Pin, id = 0, hr = 0
0.506: Pin 1: Communication type = 0
0.506: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.509: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0889&subsys_1458a002&rev_1000#4&2f790c35&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rearlineoutwave3
0.509: All devices enumerated
0.511: Filters enumerated
0.511: Filter for rendering is avaliable
0.512: Total 1 filters
0.512: Try WAVEFORMATEXTENSIBLE format
0.513: Pin Looped 1
0.514: Successfully instantiated Render Pin. Handle = 0x00000120
0.514: Pin for rendering is avaliable
0.515: Заполнение буфера 16-битным синусом
0.520: Pin state is KSSTATE_STOP
:v2_dizzy_keyboard:
Цитата:
0.500: Entering RenderThreadProc
0.512: Device found
0.513: Pin 0: Communication type = 1
0.514: Total 7 DataRanges
0.514: Interface GUID {1A8766A0-62CE-11CF-A5}
0.515: Interfice ID 1
0.515: Found SINK IN Pin, id = 0, hr = 0
0.515: Pin 1: Communication type = 0
0.516: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.518: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rearlineoutwave3
0.520: Pin 0: Communication type = 1
0.521: Total 6 DataRanges
0.522: Interface GUID {1A8766A0-62CE-11CF-A5}
0.522: Interfice ID 1
0.522: Found SINK IN Pin, id = 0, hr = 0
0.523: Pin 1: Communication type = 0
0.523: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.523: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifoptwave
0.524: Pin 0: Communication type = 1
0.524: Total 6 DataRanges
0.525: Interface GUID {1A8766A0-62CE-11CF-A5}
0.525: Interfice ID 1
0.525: Found SINK IN Pin, id = 0, hr = 0
0.526: Pin 1: Communication type = 0
0.526: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.526: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtspdifwave
0.529: All devices enumerated
0.532: Filters enumerated
0.533: Filter for rendering is avaliable
0.533: Total 3 filters
0.533: Try WAVEFORMATEXTENSIBLE format
0.534: Pin Looped 1
0.534: Error_Success = 22
0.535: Failed to instantiate pin. hr=0x80070016
0.535: Failed to instantiate Render Pin
0.535: Pin Looped 1
0.536: Error_Success = 22
0.536: Failed to instantiate pin. hr=0x80070016
0.536: Try WAVEFORMATEX format
0.536: Pin Looped 0
0.537: Error_Success = 1169
0.537: Failed to instantiate pin. hr=0x80070491
0.537: Failed to instantiate Render Pin
0.537: Pin Looped 0
0.538: Error_Success = 1169
0.538: Failed to instantiate pin. hr=0x80070491
0.538: No pins available for rendering
0.538: Leaving RenderThreadProc
---------- Post added at 03:46 ---------- Previous post was at 03:19 ----------
Поставил другие драйвера:
Цитата:
0.500: Entering RenderThreadProc
0.514: Device found
0.515: Pin 0: Communication type = 1
0.516: Total 1 DataRanges
0.516: Interface GUID {1A8766A0-62CE-11CF-A5}
0.517: Interfice ID 1
0.517: Found SINK IN Pin, id = 0, hr = 0
0.517: Pin 1: Communication type = 0
0.518: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.520: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\elineoutwave
0.521: Pin 0: Communication type = 1
0.522: Total 5 DataRanges
0.522: Interface GUID {1A8766A0-62CE-11CF-A5}
0.523: Interfice ID 1
0.523: Found SINK IN Pin, id = 0, hr = 0
0.523: Pin 1: Communication type = 0
0.524: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.524: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\espdifout2wave
0.525: Pin 0: Communication type = 1
0.526: Total 5 DataRanges
0.526: Interface GUID {1A8766A0-62CE-11CF-A5}
0.527: Interfice ID 1
0.527: Found SINK IN Pin, id = 0, hr = 0
0.527: Pin 1: Communication type = 0
0.527: RenderSink = 1, RenderSource = 0, CaptureSink = 0, CaptureSource = 0
0.527: Succeeded to create filter for \\?\hdaudio#func_01&ven_10ec&dev_0892&subsys_1458a 022&rev_1003#4&24707100&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\espdifoutwave
0.529: All devices enumerated
0.530: Filters enumerated
0.531: Filter for rendering is avaliable
0.531: Total 3 filters
0.531: Try WAVEFORMATEXTENSIBLE format
0.531: Pin Looped 1
0.533: Successfully instantiated Render Pin. Handle = 0x00000104
0.533: Pin for rendering is avaliable
0.534: Заполнение буфера 16-битным синусом
0.537: Pin state is KSSTATE_STOP
Еще немного, и Titus докажет нам, что Windows - ОСь реального времени :)