Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
52c97d4e
Commit
52c97d4e
authored
26 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added new function CDAUDIO_Seek().
parent
3fb2f428
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/cdrom.h
+2
-1
2 additions, 1 deletion
include/cdrom.h
misc/cdrom.c
+26
-1
26 additions, 1 deletion
misc/cdrom.c
with
28 additions
and
2 deletions
include/cdrom.h
+
2
−
1
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
...
...
This diff is collapsed.
Click to expand it.
misc/cdrom.c
+
26
−
1
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]
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment