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
8f46a511
Commit
8f46a511
authored
Feb 20, 2008
by
Chris Robinson
Committed by
Alexandre Julliard
Feb 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemp3: Don't keep unused data buffered.
parent
64683549
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
interface.c
dlls/winemp3.acm/interface.c
+4
-1
mpegl3.c
dlls/winemp3.acm/mpegl3.c
+5
-2
mpglib.h
dlls/winemp3.acm/mpglib.h
+1
-1
No files found.
dlls/winemp3.acm/interface.c
View file @
8f46a511
...
@@ -48,7 +48,7 @@ BOOL InitMP3(struct mpstr *mp)
...
@@ -48,7 +48,7 @@ BOOL InitMP3(struct mpstr *mp)
return
!
0
;
return
!
0
;
}
}
void
ExitMP3
(
struct
mpstr
*
mp
)
void
ClearMP3Buffer
(
struct
mpstr
*
mp
)
{
{
struct
buf
*
b
,
*
bn
;
struct
buf
*
b
,
*
bn
;
...
@@ -59,6 +59,9 @@ void ExitMP3(struct mpstr *mp)
...
@@ -59,6 +59,9 @@ void ExitMP3(struct mpstr *mp)
free
(
b
);
free
(
b
);
b
=
bn
;
b
=
bn
;
}
}
mp
->
tail
=
NULL
;
mp
->
head
=
NULL
;
mp
->
bsize
=
0
;
}
}
static
struct
buf
*
addbuf
(
struct
mpstr
*
mp
,
const
unsigned
char
*
buf
,
int
size
)
static
struct
buf
*
addbuf
(
struct
mpstr
*
mp
,
const
unsigned
char
*
buf
,
int
size
)
...
...
dlls/winemp3.acm/mpegl3.c
View file @
8f46a511
...
@@ -163,6 +163,9 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
...
@@ -163,6 +163,9 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
buffered_after
=
get_num_buffered_bytes
(
&
amd
->
mp
);
buffered_after
=
get_num_buffered_bytes
(
&
amd
->
mp
);
TRACE
(
"before %d put %d during %d after %d
\n
"
,
buffered_before
,
*
nsrc
,
buffered_during
,
buffered_after
);
TRACE
(
"before %d put %d during %d after %d
\n
"
,
buffered_before
,
*
nsrc
,
buffered_during
,
buffered_after
);
*
nsrc
-=
buffered_after
;
ClearMP3Buffer
(
&
amd
->
mp
);
}
}
/***********************************************************************
/***********************************************************************
...
@@ -376,7 +379,7 @@ static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
...
@@ -376,7 +379,7 @@ static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
*/
*/
static
void
MPEG3_Reset
(
PACMDRVSTREAMINSTANCE
adsi
,
AcmMpeg3Data
*
aad
)
static
void
MPEG3_Reset
(
PACMDRVSTREAMINSTANCE
adsi
,
AcmMpeg3Data
*
aad
)
{
{
ExitMP3
(
&
aad
->
mp
);
ClearMP3Buffer
(
&
aad
->
mp
);
InitMP3
(
&
aad
->
mp
);
InitMP3
(
&
aad
->
mp
);
}
}
...
@@ -438,7 +441,7 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
...
@@ -438,7 +441,7 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
*/
*/
static
LRESULT
MPEG3_StreamClose
(
PACMDRVSTREAMINSTANCE
adsi
)
static
LRESULT
MPEG3_StreamClose
(
PACMDRVSTREAMINSTANCE
adsi
)
{
{
ExitMP3
(
&
((
AcmMpeg3Data
*
)
adsi
->
dwDriver
)
->
mp
);
ClearMP3Buffer
(
&
((
AcmMpeg3Data
*
)
adsi
->
dwDriver
)
->
mp
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
adsi
->
dwDriver
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
adsi
->
dwDriver
);
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
}
...
...
dlls/winemp3.acm/mpglib.h
View file @
8f46a511
...
@@ -62,7 +62,7 @@ extern "C" {
...
@@ -62,7 +62,7 @@ extern "C" {
BOOL
InitMP3
(
struct
mpstr
*
mp
);
BOOL
InitMP3
(
struct
mpstr
*
mp
);
int
decodeMP3
(
struct
mpstr
*
mp
,
const
unsigned
char
*
inmemory
,
int
inmemsize
,
int
decodeMP3
(
struct
mpstr
*
mp
,
const
unsigned
char
*
inmemory
,
int
inmemsize
,
unsigned
char
*
outmemory
,
int
outmemsize
,
int
*
done
);
unsigned
char
*
outmemory
,
int
outmemsize
,
int
*
done
);
void
ExitMP3
(
struct
mpstr
*
mp
);
void
ClearMP3Buffer
(
struct
mpstr
*
mp
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
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