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
b4b9303e
Commit
b4b9303e
authored
Dec 25, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 25, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed first/last playable frame referencing.
parent
f919cf3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
cdrom.h
include/cdrom.h
+9
-5
cdrom.c
misc/cdrom.c
+9
-6
int2f.c
msdos/int2f.c
+2
-2
No files found.
include/cdrom.h
View file @
b4b9303e
...
@@ -30,17 +30,21 @@ typedef struct {
...
@@ -30,17 +30,21 @@ typedef struct {
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#elif defined(__FreeBSD__) || defined(__NetBSD__)
struct
cd_sub_channel_info
sc
;
struct
cd_sub_channel_info
sc
;
#endif
#endif
int
cdaMode
;
/* those data reflect the cdaudio structure and
UINT16
nCurTrack
;
* don't change while playing
DWORD
dwCurFrame
;
*/
UINT16
nTracks
;
UINT16
nTracks
;
UINT16
nFirstTrack
;
UINT16
nFirstTrack
;
UINT16
nLastTrack
;
UINT16
nLastTrack
;
DWORD
dwTotalLen
;
LPDWORD
lpdwTrackLen
;
LPDWORD
lpdwTrackLen
;
LPDWORD
lpdwTrackPos
;
LPDWORD
lpdwTrackPos
;
LPBYTE
lpbTrackFlags
;
LPBYTE
lpbTrackFlags
;
DWORD
dwFirstOffset
;
DWORD
dwFirstFrame
;
DWORD
dwLastFrame
;
/* those data change while playing */
int
cdaMode
;
UINT16
nCurTrack
;
DWORD
dwCurFrame
;
}
WINE_CDAUDIO
;
}
WINE_CDAUDIO
;
#define WINE_CDA_DONTKNOW 0x00
#define WINE_CDA_DONTKNOW 0x00
...
...
misc/cdrom.c
View file @
b4b9303e
...
@@ -39,8 +39,8 @@ int CDAUDIO_Open(WINE_CDAUDIO* wcda)
...
@@ -39,8 +39,8 @@ int CDAUDIO_Open(WINE_CDAUDIO* wcda)
wcda
->
cdaMode
=
WINE_CDA_OPEN
;
/* to force reading tracks info */
wcda
->
cdaMode
=
WINE_CDA_OPEN
;
/* to force reading tracks info */
wcda
->
nCurTrack
=
0
;
wcda
->
nCurTrack
=
0
;
wcda
->
nTracks
=
0
;
wcda
->
nTracks
=
0
;
wcda
->
dw
TotalLen
=
0
;
wcda
->
dw
FirstFrame
=
0
;
wcda
->
dw
FirstOffset
=
0
;
wcda
->
dw
LastFrame
=
0
;
wcda
->
lpdwTrackLen
=
NULL
;
wcda
->
lpdwTrackLen
=
NULL
;
wcda
->
lpdwTrackPos
=
NULL
;
wcda
->
lpdwTrackPos
=
NULL
;
wcda
->
lpbTrackFlags
=
NULL
;
wcda
->
lpbTrackFlags
=
NULL
;
...
@@ -152,7 +152,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
...
@@ -152,7 +152,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
#endif
#endif
else
else
#ifdef linux
#ifdef linux
entry
.
cdte_track
=
i
+
1
;
entry
.
cdte_track
=
i
+
1
;
#else
#else
entry
.
starting_track
=
i
+
1
;
entry
.
starting_track
=
i
+
1
;
#endif
#endif
...
@@ -187,7 +187,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
...
@@ -187,7 +187,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
#endif
#endif
if
(
i
==
0
)
{
if
(
i
==
0
)
{
last_start
=
start
;
last_start
=
start
;
wcda
->
dwFirst
Offset
=
start
;
wcda
->
dwFirst
Frame
=
start
;
TRACE
(
"dwFirstOffset=%u
\n
"
,
start
);
TRACE
(
"dwFirstOffset=%u
\n
"
,
start
);
}
else
{
}
else
{
length
=
start
-
last_start
;
length
=
start
-
last_start
;
...
@@ -207,7 +207,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
...
@@ -207,7 +207,7 @@ BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda)
#endif
#endif
TRACE
(
"track #%u flags=%02x
\n
"
,
i
+
1
,
wcda
->
lpbTrackFlags
[
i
]);
TRACE
(
"track #%u flags=%02x
\n
"
,
i
+
1
,
wcda
->
lpbTrackFlags
[
i
]);
}
}
wcda
->
dw
TotalLen
=
total_length
;
wcda
->
dw
LastFrame
=
last_start
;
TRACE
(
"total_len=%u
\n
"
,
total_length
);
TRACE
(
"total_len=%u
\n
"
,
total_length
);
return
TRUE
;
return
TRUE
;
#else
#else
...
@@ -425,6 +425,9 @@ int CDAUDIO_Pause(WINE_CDAUDIO* wcda, int pauseOn)
...
@@ -425,6 +425,9 @@ int CDAUDIO_Pause(WINE_CDAUDIO* wcda, int pauseOn)
#endif
#endif
}
}
/**************************************************************************
* CDAUDIO_Seek [internal]
*/
int
CDAUDIO_Seek
(
WINE_CDAUDIO
*
wcda
,
DWORD
at
)
int
CDAUDIO_Seek
(
WINE_CDAUDIO
*
wcda
,
DWORD
at
)
{
{
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
...
@@ -435,7 +438,7 @@ int CDAUDIO_Seek(WINE_CDAUDIO* wcda, DWORD at)
...
@@ -435,7 +438,7 @@ int CDAUDIO_Seek(WINE_CDAUDIO* wcda, DWORD at)
msf
.
second
=
(
at
%
CDFRAMES_PERMIN
)
/
CDFRAMES_PERSEC
;
msf
.
second
=
(
at
%
CDFRAMES_PERMIN
)
/
CDFRAMES_PERSEC
;
msf
.
frame
=
at
%
CDFRAMES_PERSEC
;
msf
.
frame
=
at
%
CDFRAMES_PERSEC
;
ret
=
ioctl
(
wcda
->
unixdev
,
CDROMSEEK
,
&
msf
);
ret
=
ioctl
(
wcda
->
unixdev
,
CDROMSEEK
,
&
msf
);
#else
#else
/* FIXME: the current end for play is lost
/* FIXME: the current end for play is lost
* use end of CD ROM instead
* use end of CD ROM instead
...
...
msdos/int2f.c
View file @
b4b9303e
...
@@ -620,7 +620,7 @@ static void MSCDEX_Handler(CONTEXT86* context)
...
@@ -620,7 +620,7 @@ static void MSCDEX_Handler(CONTEXT86* context)
break
;
break
;
case
8
:
/* Volume size */
case
8
:
/* Volume size */
PTR_AT
(
io_stru
,
1
,
DWORD
)
=
wcda
.
dw
TotalLen
;
PTR_AT
(
io_stru
,
1
,
DWORD
)
=
wcda
.
dw
LastFrame
;
TRACE
(
" ----> VOLUME SIZE <%ld>
\n
"
,
PTR_AT
(
io_stru
,
1
,
DWORD
));
TRACE
(
" ----> VOLUME SIZE <%ld>
\n
"
,
PTR_AT
(
io_stru
,
1
,
DWORD
));
break
;
break
;
...
@@ -633,7 +633,7 @@ static void MSCDEX_Handler(CONTEXT86* context)
...
@@ -633,7 +633,7 @@ static void MSCDEX_Handler(CONTEXT86* context)
case
10
:
/* audio disk info */
case
10
:
/* audio disk info */
io_stru
[
1
]
=
wcda
.
nFirstTrack
;
/* starting track of the disc */
io_stru
[
1
]
=
wcda
.
nFirstTrack
;
/* starting track of the disc */
io_stru
[
2
]
=
wcda
.
nLastTrack
;
/* ending track */
io_stru
[
2
]
=
wcda
.
nLastTrack
;
/* ending track */
MSCDEX_StoreMSF
(
wcda
.
dw
TotalLen
,
io_stru
+
3
);
MSCDEX_StoreMSF
(
wcda
.
dw
LastFrame
,
io_stru
+
3
);
TRACE
(
" ----> AUDIO DISK INFO <%d-%d/%08lx>
\n
"
,
TRACE
(
" ----> AUDIO DISK INFO <%d-%d/%08lx>
\n
"
,
io_stru
[
1
],
io_stru
[
2
],
PTR_AT
(
io_stru
,
3
,
DWORD
));
io_stru
[
1
],
io_stru
[
2
],
PTR_AT
(
io_stru
,
3
,
DWORD
));
...
...
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