Skip to content

Commit d65f6bb

Browse files
authored
Merge pull request #1220 from judzmura/simpleAudioUpdates
Small fixes to sample.
2 parents 66f7736 + 82646a9 commit d65f6bb

File tree

4 files changed

+5
-107
lines changed

4 files changed

+5
-107
lines changed

audio/simpleaudiosample/Source/Filters/speakertoptable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static
8787
KSJACK_DESCRIPTION SpeakerJackDescBridge =
8888
{
8989
KSAUDIO_SPEAKER_STEREO,
90-
0xB3C98C, // Color spec for green
90+
JACKDESC_RGB(0xB3,0xC9,0x8C), // Color spec for green
9191
eConnTypeUnknown,
9292
eGeoLocFront,
9393
eGenLocPrimaryBox,

audio/simpleaudiosample/Source/Main/common.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,7 @@ Return Value:
25112511

25122512
// Allocate the key value name string
25132513
pwstrKeyValueName = (PWSTR)ExAllocatePool2(POOL_FLAG_NON_PAGED, kvFullInfo->NameLength + sizeof(WCHAR)*2, MINADAPTER_POOLTAG);
2514-
IF_TRUE_ACTION_JUMP(kvFullInfo == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit);
2514+
IF_TRUE_ACTION_JUMP(pwstrKeyValueName == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit);
25152515

25162516
// Copy the key value name from the full information struct
25172517
RtlStringCbCopyNW(pwstrKeyValueName, kvFullInfo->NameLength + sizeof(WCHAR)*2, kvFullInfo->Name, kvFullInfo->NameLength);
@@ -2531,6 +2531,7 @@ Return Value:
25312531
if (pwstrKeyValueName)
25322532
{
25332533
ExFreePoolWithTag(pwstrKeyValueName, MINADAPTER_POOLTAG);
2534+
pwstrKeyValueName = NULL;
25342535
}
25352536

25362537
// Bail if anything failed
@@ -2618,7 +2619,7 @@ Return Value:
26182619

26192620
// Allocate the key name string
26202621
pwstrKeyName = (PWSTR)ExAllocatePool2(POOL_FLAG_NON_PAGED, kBasicInfo->NameLength + sizeof(WCHAR), MINADAPTER_POOLTAG);
2621-
IF_TRUE_ACTION_JUMP(kBasicInfo == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit);
2622+
IF_TRUE_ACTION_JUMP(pwstrKeyName == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit);
26222623

26232624
// Copy the key name from the basic information struct
26242625
RtlStringCbCopyNW(pwstrKeyName, kBasicInfo->NameLength + sizeof(WCHAR), kBasicInfo->Name, kBasicInfo->NameLength);
@@ -2652,6 +2653,7 @@ Return Value:
26522653
if (pwstrKeyName)
26532654
{
26542655
ExFreePoolWithTag(pwstrKeyName, MINADAPTER_POOLTAG);
2656+
pwstrKeyName = NULL;
26552657
}
26562658

26572659
// Close the current source key

audio/simpleaudiosample/Source/Main/minwavert.h

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -204,58 +204,6 @@ class CMiniportWaveRT :
204204
};
205205
#pragma code_seg()
206206

207-
//---------------------------------------------------------------------------------------------------------
208-
// volume
209-
//---------------------------------------------------------------------------------------------------------
210-
NTSTATUS GetVolumeChannelCount
211-
(
212-
_Out_ UINT32* pulChannelCount
213-
);
214-
215-
NTSTATUS GetVolumeSteppings
216-
(
217-
_Out_writes_bytes_(_ui32DataSize) PKSPROPERTY_STEPPING_LONG _pKsPropStepLong,
218-
_In_ UINT32 _ui32DataSize
219-
);
220-
221-
NTSTATUS GetChannelVolume
222-
(
223-
_In_ UINT32 _uiChannel,
224-
_Out_ LONG* _pVolume
225-
);
226-
227-
NTSTATUS SetChannelVolume
228-
(
229-
_In_ UINT32 _uiChannel,
230-
_In_ LONG _Volume
231-
);
232-
233-
//-----------------------------------------------------------------------------
234-
// mute
235-
//-----------------------------------------------------------------------------
236-
NTSTATUS GetMuteChannelCount
237-
(
238-
_Out_ UINT32* pulChannelCount
239-
);
240-
241-
NTSTATUS GetMuteSteppings
242-
(
243-
_Out_writes_bytes_(_ui32DataSize) PKSPROPERTY_STEPPING_LONG _pKsPropStepLong,
244-
_In_ UINT32 _ui32DataSize
245-
);
246-
247-
NTSTATUS GetChannelMute
248-
(
249-
_In_ UINT32 _uiChannel,
250-
_Out_ BOOL* _pbMute
251-
);
252-
253-
NTSTATUS SetChannelMute
254-
(
255-
_In_ UINT32 _uiChannel,
256-
_In_ BOOL _bMute
257-
);
258-
259207
private:
260208
_IRQL_raises_(DISPATCH_LEVEL)
261209
_Acquires_lock_(m_DeviceFormatsAndModesLock)

audio/simpleaudiosample/Source/Main/minwavertstream.h

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -131,63 +131,11 @@ class CMiniportWaveRTStream :
131131

132132
public:
133133

134-
NTSTATUS GetVolumeChannelCount
135-
(
136-
_Out_ UINT32* puiChannelCount
137-
);
138-
139-
NTSTATUS GetVolumeSteppings
140-
(
141-
_Out_writes_bytes_(_ui32DataSize) PKSPROPERTY_STEPPING_LONG _pKsPropStepLong,
142-
_In_ UINT32 _ui32DataSize
143-
);
144-
145-
NTSTATUS GetChannelVolume
146-
(
147-
_In_ UINT32 _uiChannel,
148-
_Out_ LONG* _pVolume
149-
);
150-
151-
NTSTATUS SetChannelVolume
152-
(
153-
_In_ UINT32 _uiChannel,
154-
_In_ LONG _Volume
155-
);
156-
157-
NTSTATUS GetMuteChannelCount
158-
(
159-
_Out_ UINT32* puiChannelCount
160-
);
161-
162-
NTSTATUS GetMuteSteppings
163-
(
164-
_Out_writes_bytes_(_ui32DataSize) PKSPROPERTY_STEPPING_LONG _pKsPropStepLong,
165-
_In_ UINT32 _ui32DataSize
166-
);
167-
168-
NTSTATUS GetChannelMute
169-
(
170-
_In_ UINT32 _uiChannel,
171-
_Out_ BOOL* _pbMute
172-
);
173-
174-
NTSTATUS SetChannelMute
175-
(
176-
_In_ UINT32 _uiChannel,
177-
_In_ BOOL _bMute
178-
);
179-
180134
//presentation
181135
NTSTATUS GetPresentationPosition
182136
(
183137
_Out_ KSAUDIO_PRESENTATION_POSITION *_pPresentationPosition
184138
);
185-
186-
NTSTATUS SetCurrentWritePosition
187-
(
188-
_In_ ULONG ulCurrentWritePosition
189-
);
190-
191139

192140
ULONG GetCurrentWaveRTWritePosition()
193141
{

0 commit comments

Comments
 (0)