mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[USBAUDIO]
- improve guid mess a bit - thanks amine svn path=/trunk/; revision=72833
This commit is contained in:
parent
8112191cdb
commit
17cc431d33
3 changed files with 10 additions and 19 deletions
|
@ -25,9 +25,7 @@ GUID NodeTypeSubwoofer = { STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER };
|
|||
GUID NodeTypeCapture = { STATIC_PINNAME_CAPTURE };
|
||||
GUID NodeTypePlayback = { STATIC_KSCATEGORY_AUDIO };
|
||||
GUID GUID_KSCATEGORY_AUDIO = { STATIC_KSCATEGORY_AUDIO };
|
||||
GUID GUID_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
|
||||
GUID GUID_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
|
||||
GUID GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX };
|
||||
|
||||
KSPIN_INTERFACE StandardPinInterface =
|
||||
{
|
||||
{STATIC_KSINTERFACESETID_Standard},
|
||||
|
@ -367,9 +365,9 @@ UsbAudioGetDataRanges(
|
|||
}
|
||||
|
||||
DataRangeAudio->DataRange.FormatSize = sizeof(KSDATARANGE_AUDIO);
|
||||
DataRangeAudio->DataRange.MajorFormat = GUID_KSDATAFORMAT_TYPE_AUDIO;
|
||||
DataRangeAudio->DataRange.SubFormat = GUID_KSDATAFORMAT_SUBTYPE_PCM;
|
||||
DataRangeAudio->DataRange.Specifier = GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
|
||||
DataRangeAudio->DataRange.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
|
||||
DataRangeAudio->DataRange.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
|
||||
DataRangeAudio->DataRange.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
|
||||
DataRangeAudio->MaximumChannels = 1;
|
||||
DataRangeAudio->MinimumBitsPerSample = StreamingFormatDescriptor->bBitResolution;
|
||||
DataRangeAudio->MaximumBitsPerSample = StreamingFormatDescriptor->bBitResolution;
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
|
||||
|
||||
//#include <wdm.h>
|
||||
#include <initguid.h>
|
||||
#include <portcls.h>
|
||||
#include <wdmguid.h>
|
||||
#include <ksmedia.h>
|
||||
#include <hubbusif.h>
|
||||
#include <usbbusif.h>
|
||||
|
||||
/* FIXME */
|
||||
DEFINE_GUID(KSNAME_Filter, 0x9b365890L, 0x165f, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4);
|
||||
DEFINE_GUID(KSDATAFORMAT_TYPE_AUDIO, 0x73647561L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
|
||||
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
|
||||
DEFINE_GUID(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, 0x05589f81L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a);
|
||||
|
||||
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
|
||||
#include "usbaudio.h"
|
||||
|
||||
GUID GUID2_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
|
||||
GUID GUID2_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
|
||||
GUID GUID2_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX };
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
USBAudioPinCreate(
|
||||
|
@ -103,9 +99,9 @@ USBAudioPinSetDataFormat(
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat, &GUID2_KSDATAFORMAT_TYPE_AUDIO) &&
|
||||
IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat, &GUID2_KSDATAFORMAT_SUBTYPE_PCM) &&
|
||||
IsEqualGUIDAligned(&Pin->ConnectionFormat->Specifier, &GUID2_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
|
||||
if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat, &KSDATAFORMAT_TYPE_AUDIO) &&
|
||||
IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) &&
|
||||
IsEqualGUIDAligned(&Pin->ConnectionFormat->Specifier, &KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
|
||||
{
|
||||
WaveFormatEx = (PKSDATAFORMAT_WAVEFORMATEX)Pin->ConnectionFormat;
|
||||
SampleRateBuffer[0] = (WaveFormatEx->WaveFormatEx.nSamplesPerSec >> 16) & 0xFF;
|
||||
|
|
Loading…
Reference in a new issue