Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d1a7136b
Commit
d1a7136b
authored
Mar 28, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineesd.drv: Rename esd_fd to stream_fd.
It is used to send/receive stream data, not to send RPCs to the sound server as esd_fd would imply. This is a no-op.
parent
91d42b37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
audio.c
dlls/wineesd.drv/audio.c
+31
-31
No files found.
dlls/wineesd.drv/audio.c
View file @
d1a7136b
...
...
@@ -165,7 +165,7 @@ typedef struct {
DWORD
dwSleepTime
;
/* Num of milliseconds to sleep between filling the dsp buffers */
/* esd information */
int
esd
_fd
;
/* the socket fd we get from esd when opening a stream for playing */
int
stream
_fd
;
/* the socket fd we get from esd when opening a stream for playing */
char
*
sound_buffer
;
long
buffer_size
;
...
...
@@ -198,7 +198,7 @@ typedef struct {
char
interface_name
[
32
];
/* esd information */
int
esd
_fd
;
/* the socket fd we get from esd when opening a stream for recording */
int
stream
_fd
;
/* the socket fd we get from esd when opening a stream for recording */
LPWAVEHDR
lpQueuePtr
;
DWORD
dwRecordedTotal
;
...
...
@@ -397,8 +397,8 @@ static void copy_format(LPWAVEFORMATEX wf1, LPWAVEFORMATPCMEX wf2)
*/
static
void
ESD_CloseWaveOutDevice
(
WINE_WAVEOUT
*
wwo
)
{
esd_close
(
wwo
->
esd_fd
);
/* close the esd socket fd */
wwo
->
esd
_fd
=
-
1
;
esd_close
(
wwo
->
stream_fd
);
wwo
->
stream
_fd
=
-
1
;
/* free up the buffer we use for volume and reset the size */
HeapFree
(
GetProcessHeap
(),
0
,
wwo
->
sound_buffer
);
...
...
@@ -412,8 +412,8 @@ static void ESD_CloseWaveOutDevice(WINE_WAVEOUT* wwo)
*/
static
void
ESD_CloseWaveInDevice
(
WINE_WAVEIN
*
wwi
)
{
esd_close
(
wwi
->
esd_fd
);
/* close the esd socket fd */
wwi
->
esd
_fd
=
-
1
;
esd_close
(
wwi
->
stream_fd
);
wwi
->
stream
_fd
=
-
1
;
}
/******************************************************************
...
...
@@ -426,7 +426,7 @@ LONG ESD_WaveClose(void)
/* close all open devices */
for
(
iDevice
=
0
;
iDevice
<
MAX_WAVEOUTDRV
;
iDevice
++
)
{
if
(
WOutDev
[
iDevice
].
esd
_fd
!=
-
1
)
if
(
WOutDev
[
iDevice
].
stream
_fd
!=
-
1
)
{
ESD_CloseWaveOutDevice
(
&
WOutDev
[
iDevice
]);
}
...
...
@@ -434,7 +434,7 @@ LONG ESD_WaveClose(void)
for
(
iDevice
=
0
;
iDevice
<
MAX_WAVEINDRV
;
iDevice
++
)
{
if
(
WInDev
[
iDevice
].
esd
_fd
!=
-
1
)
if
(
WInDev
[
iDevice
].
stream
_fd
!=
-
1
)
{
ESD_CloseWaveInDevice
(
&
WInDev
[
iDevice
]);
}
...
...
@@ -468,7 +468,7 @@ LONG ESD_WaveInit(void)
{
static
const
WCHAR
ini
[]
=
{
'E'
,
's'
,
'o'
,
'u'
,
'n'
,
'D'
,
' '
,
'W'
,
'a'
,
'v'
,
'e'
,
'O'
,
'u'
,
't'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
WOutDev
[
i
].
esd
_fd
=
-
1
;
WOutDev
[
i
].
stream
_fd
=
-
1
;
memset
(
&
WOutDev
[
i
].
caps
,
0
,
sizeof
(
WOutDev
[
i
].
caps
));
/* zero out
caps values */
WOutDev
[
i
].
caps
.
wMid
=
0x00FF
;
/* Manufacturer ID */
...
...
@@ -501,7 +501,7 @@ LONG ESD_WaveInit(void)
{
static
const
WCHAR
ini
[]
=
{
'E'
,
's'
,
'o'
,
'u'
,
'n'
,
'D'
,
' '
,
'W'
,
'a'
,
'v'
,
'e'
,
'I'
,
'n'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
WInDev
[
i
].
esd
_fd
=
-
1
;
WInDev
[
i
].
stream
_fd
=
-
1
;
memset
(
&
WInDev
[
i
].
caps
,
0
,
sizeof
(
WInDev
[
i
].
caps
));
/* zero out
caps values */
WInDev
[
i
].
caps
.
wMid
=
0x00FF
;
...
...
@@ -870,7 +870,7 @@ static int wodPlayer_WriteMaxFrags(WINE_WAVEOUT* wwo, DWORD* bytes)
}
/* send the audio data to esd for playing */
written
=
write
(
wwo
->
esd
_fd
,
wwo
->
sound_buffer
,
toWrite
);
written
=
write
(
wwo
->
stream
_fd
,
wwo
->
sound_buffer
,
toWrite
);
TRACE
(
"written = %d
\n
"
,
written
);
...
...
@@ -1211,7 +1211,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
}
/* if this device is already open tell the app that it is allocated */
if
(
WOutDev
[
wDevID
].
esd
_fd
!=
-
1
)
if
(
WOutDev
[
wDevID
].
stream
_fd
!=
-
1
)
{
TRACE
(
"device already allocated
\n
"
);
return
MMSYSERR_ALLOCATED
;
...
...
@@ -1264,13 +1264,13 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
out_rate
=
(
int
)
wwo
->
waveFormat
.
Format
.
nSamplesPerSec
;
TRACE
(
"esd output format = 0x%08x, rate = %d
\n
"
,
out_format
,
out_rate
);
wwo
->
esd
_fd
=
esd_play_stream
(
out_format
,
out_rate
,
NULL
,
"wineesd"
);
wwo
->
stream
_fd
=
esd_play_stream
(
out_format
,
out_rate
,
NULL
,
"wineesd"
);
/* clear these so we don't have any confusion ;-) */
wwo
->
sound_buffer
=
0
;
wwo
->
buffer_size
=
0
;
if
(
wwo
->
esd
_fd
<
0
)
return
MMSYSERR_ALLOCATED
;
if
(
wwo
->
stream
_fd
<
0
)
return
MMSYSERR_ALLOCATED
;
wwo
->
dwPlayedTotal
=
0
;
wwo
->
dwWrittenTotal
=
0
;
...
...
@@ -1295,7 +1295,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
}
wwo
->
hStartUpEvent
=
INVALID_HANDLE_VALUE
;
TRACE
(
"
esd=%d
\n
"
,
wwo
->
esd
_fd
);
TRACE
(
"
stream=%d
\n
"
,
wwo
->
stream
_fd
);
TRACE
(
"wBitsPerSample=%u, nAvgBytesPerSec=%u, nSamplesPerSec=%u, nChannels=%u nBlockAlign=%u!
\n
"
,
wwo
->
waveFormat
.
Format
.
wBitsPerSample
,
wwo
->
waveFormat
.
Format
.
nAvgBytesPerSec
,
...
...
@@ -1315,7 +1315,7 @@ static DWORD wodClose(WORD wDevID)
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1348,7 +1348,7 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
TRACE
(
"(%u, %p, %08X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
/* first, do the sanity checks... */
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad dev ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1383,7 +1383,7 @@ static DWORD wodPause(WORD wDevID)
{
TRACE
(
"(%u);!
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1401,7 +1401,7 @@ static DWORD wodRestart(WORD wDevID)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1426,7 +1426,7 @@ static DWORD wodReset(WORD wDevID)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1446,7 +1446,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
TRACE
(
"(%u, %p, %u);
\n
"
,
wDevID
,
lpTime
,
uSize
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1469,7 +1469,7 @@ static DWORD wodBreakLoop(WORD wDevID)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
esd
_fd
==
-
1
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
stream
_fd
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
}
...
...
@@ -1711,7 +1711,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
while
(
wwi
->
lpQueuePtr
)
{
TRACE
(
"attempt to read %d bytes
\n
"
,
lpWaveHdr
->
dwBufferLength
-
lpWaveHdr
->
dwBytesRecorded
);
bytesRead
=
read
(
wwi
->
esd
_fd
,
bytesRead
=
read
(
wwi
->
stream
_fd
,
lpWaveHdr
->
lpData
+
lpWaveHdr
->
dwBytesRecorded
,
lpWaveHdr
->
dwBufferLength
-
lpWaveHdr
->
dwBytesRecorded
);
TRACE
(
"bytesRead=%d
\n
"
,
bytesRead
);
...
...
@@ -1858,7 +1858,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
}
/* if this device is already open tell the app that it is allocated */
if
(
WInDev
[
wDevID
].
esd
_fd
!=
-
1
)
if
(
WInDev
[
wDevID
].
stream
_fd
!=
-
1
)
{
TRACE
(
"device already allocated
\n
"
);
return
MMSYSERR_ALLOCATED
;
...
...
@@ -1912,11 +1912,11 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
TRACE
(
"esd input format = 0x%08x, rate = %d
\n
"
,
in_format
,
in_rate
);
#ifdef WID_USE_ESDMON
wwi
->
esd
_fd
=
esd_monitor_stream
(
in_format
,
in_rate
,
NULL
,
"wineesd"
);
wwi
->
stream
_fd
=
esd_monitor_stream
(
in_format
,
in_rate
,
NULL
,
"wineesd"
);
#else
wwi
->
esd
_fd
=
esd_record_stream
(
in_format
,
in_rate
,
NULL
,
"wineesd"
);
wwi
->
stream
_fd
=
esd_record_stream
(
in_format
,
in_rate
,
NULL
,
"wineesd"
);
#endif
TRACE
(
"(wwi->
esd_fd=%d)
\n
"
,
wwi
->
esd
_fd
);
TRACE
(
"(wwi->
stream_fd=%d)
\n
"
,
wwi
->
stream
_fd
);
wwi
->
state
=
WINE_WS_STOPPED
;
if
(
wwi
->
lpQueuePtr
)
{
...
...
@@ -1924,12 +1924,12 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
wwi
->
lpQueuePtr
=
NULL
;
}
if
(
wwi
->
esd
_fd
<
0
)
return
MMSYSERR_ALLOCATED
;
if
(
wwi
->
stream
_fd
<
0
)
return
MMSYSERR_ALLOCATED
;
/* Set the
esd socket
O_NONBLOCK, so we can stop recording smoothly */
mode
=
fcntl
(
wwi
->
esd
_fd
,
F_GETFL
);
/* Set the
socket to
O_NONBLOCK, so we can stop recording smoothly */
mode
=
fcntl
(
wwi
->
stream
_fd
,
F_GETFL
);
mode
|=
O_NONBLOCK
;
fcntl
(
wwi
->
esd
_fd
,
F_SETFL
,
mode
);
fcntl
(
wwi
->
stream
_fd
,
F_SETFL
,
mode
);
wwi
->
dwRecordedTotal
=
0
;
wwi
->
wFlags
=
HIWORD
(
dwFlags
&
CALLBACK_TYPEMASK
);
...
...
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