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
52c97d4e
Commit
52c97d4e
authored
Mar 15, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 15, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new function CDAUDIO_Seek().
parent
3fb2f428
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
cdrom.h
include/cdrom.h
+2
-1
cdrom.c
misc/cdrom.c
+26
-1
No files found.
include/cdrom.h
View file @
52c97d4e
...
...
@@ -56,14 +56,15 @@ int CDAUDIO_Reset(WINE_CDAUDIO* wcda);
int
CDAUDIO_Play
(
WINE_CDAUDIO
*
wcda
,
DWORD
start
,
DWORD
stop
);
int
CDAUDIO_Stop
(
WINE_CDAUDIO
*
wcda
);
int
CDAUDIO_Pause
(
WINE_CDAUDIO
*
wcda
,
int
pauseOn
);
int
CDAUDIO_Seek
(
WINE_CDAUDIO
*
wcda
,
DWORD
at
);
int
CDAUDIO_SetDoor
(
WINE_CDAUDIO
*
wcda
,
int
open
);
UINT16
CDAUDIO_GetNumberOfTracks
(
WINE_CDAUDIO
*
wcda
);
BOOL
CDAUDIO_GetTracksInfo
(
WINE_CDAUDIO
*
wcda
);
BOOL
CDAUDIO_GetCDStatus
(
WINE_CDAUDIO
*
wcda
);
#define CDFRAMES_PERSEC 75
#define CDFRAMES_PERMIN 4500
#define SECONDS_PERMIN 60
#define CDFRAMES_PERMIN ((CDFRAMES_PERSEC) * (SECONDS_PERMIN))
#ifndef CDROM_DATA_TRACK
#define CDROM_DATA_TRACK 0x04
...
...
misc/cdrom.c
View file @
52c97d4e
...
...
@@ -29,7 +29,7 @@
int
CDAUDIO_Open
(
WINE_CDAUDIO
*
wcda
)
{
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
wcda
->
unixdev
=
open
(
CDAUDIO_DEV
,
O_RDONLY
,
0
);
wcda
->
unixdev
=
open
(
CDAUDIO_DEV
,
O_RDONLY
|
O_NONBLOCK
,
0
);
if
(
wcda
->
unixdev
==
-
1
)
{
WARN
(
cdaudio
,
"can't open '%s'!. errno=%d
\n
"
,
CDAUDIO_DEV
,
errno
);
return
-
1
;
...
...
@@ -423,6 +423,31 @@ int CDAUDIO_Pause(WINE_CDAUDIO* wcda, int pauseOn)
#endif
}
int
CDAUDIO_Seek
(
WINE_CDAUDIO
*
wcda
,
DWORD
at
)
{
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
int
ret
=
0
;
struct
cdrom_msf0
msf
;
#ifdef linux
msf
.
minute
=
at
/
CDFRAMES_PERMIN
;
msf
.
second
=
(
at
%
CDFRAMES_PERMIN
)
/
CDFRAMES_PERSEC
;
msf
.
frame
=
at
%
CDFRAMES_PERSEC
;
ret
=
ioctl
(
wcda
->
unixdev
,
CDROMSEEK
,
&
msf
);
#else
/* FIXME: the current end for play is lost
* use end of CD ROM instead
*/
FIXME
(
cdaudio
,
"Could a BSD expert implement the seek function ?
\n
"
);
CDAUDIO_Play
(
wcda
,
at
,
wcda
->
lpdwTrackPos
[
wcda
->
nTracks
]
+
wcda
->
lpdwTrackLen
[
wcda
->
nTracks
]);
#endif
return
ret
;
#else
return
-
1
;
#endif
}
/**************************************************************************
* CDAUDIO_SetDoor [internal]
*/
...
...
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