blob: 304e5bb9dd169d97613dd1b6500ffc75798a6464 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index ff21cd6..76fd474 100644
--- dlls/wineoss.drv/mmdevdrv.c
+++ dlls/wineoss.drv/mmdevdrv.c
@@ -500,7 +500,7 @@ static int get_oss_format(const WAVEFORMATEX *fmt)
case 16:
return AFMT_S16_LE;
case 24:
- return AFMT_S24_PACKED;
+ return AFMT_S24_LE;
case 32:
return AFMT_S32_LE;
}
@@ -513,7 +513,9 @@ static int get_oss_format(const WAVEFORMATEX *fmt)
if(fmt->wBitsPerSample != 32)
return -1;
+#ifdef AFMT_FLOAT
return AFMT_FLOAT;
+#endif
}
return -1;
@@ -944,16 +946,18 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient *iface,
if(formats & AFMT_S16_LE){
fmt->Format.wBitsPerSample = 16;
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
+#ifdef AFMT_FLOAT
}else if(formats & AFMT_FLOAT){
fmt->Format.wBitsPerSample = 32;
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+#endif
}else if(formats & AFMT_U8){
fmt->Format.wBitsPerSample = 8;
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
}else if(formats & AFMT_S32_LE){
fmt->Format.wBitsPerSample = 32;
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
- }else if(formats & AFMT_S24_PACKED){
+ }else if(formats & AFMT_S24_LE){
fmt->Format.wBitsPerSample = 24;
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
}else{
@@ -1174,6 +1178,10 @@ static HRESULT WINAPI AudioClient_Stop(IAudioClient *iface)
This->timer = NULL;
}
+#ifndef SNDCTL_DSP_HALT
+#define SNDCTL_DSP_HALT SNDCTL_DSP_RESET
+#endif
+
if(ioctl(This->fd, SNDCTL_DSP_HALT, NULL) < 0){
LeaveCriticalSection(&This->lock);
WARN("HALT failed: %d (%s)\n", errno, strerror(errno));
|