Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f5fe252c
Commit
f5fe252c
authored
Sep 25, 2017
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Don't use deprecated SLDataFormat_PCM struct.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a0157f57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
mmdevdrv.c
dlls/wineandroid.drv/mmdevdrv.c
+12
-6
No files found.
dlls/wineandroid.drv/mmdevdrv.c
View file @
f5fe252c
...
...
@@ -647,7 +647,7 @@ static HRESULT get_audio_session(const GUID *sessionguid,
return
S_OK
;
}
static
HRESULT
waveformat_to_pcm
(
ACImpl
*
This
,
const
WAVEFORMATEX
*
fmt
,
SL
DataFormat_PCM
*
pcm
)
static
HRESULT
waveformat_to_pcm
(
ACImpl
*
This
,
const
WAVEFORMATEX
*
fmt
,
SL
AndroidDataFormat_PCM_EX
*
pcm
)
{
/* only support non-float PCM */
if
(
fmt
->
wFormatTag
!=
WAVE_FORMAT_PCM
&&
...
...
@@ -660,20 +660,26 @@ static HRESULT waveformat_to_pcm(ACImpl *This, const WAVEFORMATEX *fmt, SLDataFo
if
(
fmt
->
nSamplesPerSec
<
8000
||
fmt
->
nSamplesPerSec
>
48000
)
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
pcm
->
formatType
=
SL_
DATAFORMAT_PCM
;
pcm
->
formatType
=
SL_
ANDROID_DATAFORMAT_PCM_EX
;
pcm
->
numChannels
=
fmt
->
nChannels
;
pcm
->
sample
sPerSec
=
fmt
->
nSamplesPerSec
*
1000
;
/* no typo, actually
in milli-Hz */
pcm
->
sample
Rate
=
fmt
->
nSamplesPerSec
*
1000
;
/* sampleRate is
in milli-Hz */
pcm
->
bitsPerSample
=
fmt
->
wBitsPerSample
;
pcm
->
containerSize
=
fmt
->
wBitsPerSample
;
/* only up to stereo */
if
(
pcm
->
numChannels
==
1
)
pcm
->
channelMask
=
SL_SPEAKER_FRONT_
LEFT
;
pcm
->
channelMask
=
SL_SPEAKER_FRONT_
CENTER
;
else
if
(
This
->
dataflow
==
eRender
&&
pcm
->
numChannels
==
2
)
pcm
->
channelMask
=
SL_SPEAKER_FRONT_LEFT
|
SL_SPEAKER_FRONT_RIGHT
;
else
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
pcm
->
endianness
=
SL_BYTEORDER_LITTLEENDIAN
;
if
(
pcm
->
bitsPerSample
==
8
)
pcm
->
representation
=
SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT
;
else
pcm
->
representation
=
SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT
;
return
S_OK
;
}
...
...
@@ -686,7 +692,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
int
i
;
HRESULT
hr
;
SLresult
sr
;
SL
DataFormat_PCM
pcm
;
SL
AndroidDataFormat_PCM_EX
pcm
;
SLDataLocator_AndroidSimpleBufferQueue
loc_bq
;
TRACE
(
"(%p)->(%x, %x, %s, %s, %p, %s)
\n
"
,
This
,
mode
,
flags
,
...
...
@@ -1056,7 +1062,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
WAVEFORMATEX
**
outpwfx
)
{
ACImpl
*
This
=
impl_from_IAudioClient
(
iface
);
SL
DataFormat_PCM
pcm
;
SL
AndroidDataFormat_PCM_EX
pcm
;
HRESULT
hr
;
TRACE
(
"(%p)->(%x, %p, %p)
\n
"
,
This
,
mode
,
pwfx
,
outpwfx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment