Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
b4ea6e52
Commit
b4ea6e52
authored
Apr 12, 2008
by
Max Kellermann
Committed by
Eric Wong
Apr 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const pointers in audio.c
git-svn-id:
https://svn.musicpd.org/mpd/trunk@7344
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
ac0ac9d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
audio.c
src/audio.c
+5
-5
audio.h
src/audio.h
+6
-5
No files found.
src/audio.c
View file @
b4ea6e52
...
...
@@ -64,7 +64,7 @@ unsigned int audio_device_count(void)
return
nr
;
}
void
copyAudioFormat
(
AudioFormat
*
dest
,
AudioFormat
*
src
)
void
copyAudioFormat
(
AudioFormat
*
dest
,
const
AudioFormat
*
src
)
{
if
(
!
src
)
return
;
...
...
@@ -72,7 +72,7 @@ void copyAudioFormat(AudioFormat * dest, AudioFormat * src)
memcpy
(
dest
,
src
,
sizeof
(
AudioFormat
));
}
int
cmpAudioFormat
(
AudioFormat
*
f1
,
AudioFormat
*
f2
)
int
cmpAudioFormat
(
const
AudioFormat
*
f1
,
const
AudioFormat
*
f2
)
{
if
(
f1
&&
f2
&&
(
f1
->
sampleRate
==
f2
->
sampleRate
)
&&
(
f1
->
bits
==
f2
->
bits
)
&&
(
f1
->
channels
==
f2
->
channels
))
...
...
@@ -141,7 +141,7 @@ void initAudioDriver(void)
}
}
void
getOutputAudioFormat
(
AudioFormat
*
inAudioFormat
,
void
getOutputAudioFormat
(
const
AudioFormat
*
inAudioFormat
,
AudioFormat
*
outAudioFormat
)
{
if
(
audio_configFormat
)
{
...
...
@@ -251,7 +251,7 @@ void finishAudioDriver(void)
audioOutputArraySize
=
0
;
}
int
isCurrentAudioFormat
(
AudioFormat
*
audioFormat
)
int
isCurrentAudioFormat
(
const
AudioFormat
*
audioFormat
)
{
if
(
!
audioFormat
)
return
1
;
...
...
@@ -319,7 +319,7 @@ static int flushAudioBuffer(void)
return
ret
;
}
int
openAudioDevice
(
AudioFormat
*
audioFormat
)
int
openAudioDevice
(
const
AudioFormat
*
audioFormat
)
{
int
ret
=
-
1
;
unsigned
int
i
;
...
...
src/audio.h
View file @
b4ea6e52
...
...
@@ -38,11 +38,12 @@ static inline double audioFormatSizeToTime(const AudioFormat * af)
return
8
.
0
/
af
->
bits
/
af
->
channels
/
af
->
sampleRate
;
}
void
copyAudioFormat
(
AudioFormat
*
dest
,
AudioFormat
*
src
);
void
copyAudioFormat
(
AudioFormat
*
dest
,
const
AudioFormat
*
src
);
int
cmpAudioFormat
(
AudioFormat
*
dest
,
AudioFormat
*
src
);
int
cmpAudioFormat
(
const
AudioFormat
*
dest
,
const
AudioFormat
*
src
);
void
getOutputAudioFormat
(
AudioFormat
*
inFormat
,
AudioFormat
*
outFormat
);
void
getOutputAudioFormat
(
const
AudioFormat
*
inFormat
,
AudioFormat
*
outFormat
);
int
parseAudioConfig
(
AudioFormat
*
audioFormat
,
char
*
conf
);
...
...
@@ -55,7 +56,7 @@ void initAudioDriver(void);
void
finishAudioDriver
(
void
);
int
openAudioDevice
(
AudioFormat
*
audioFormat
);
int
openAudioDevice
(
const
AudioFormat
*
audioFormat
);
int
playAudio
(
const
char
*
playChunk
,
size_t
size
);
...
...
@@ -65,7 +66,7 @@ void closeAudioDevice(void);
int
isAudioDeviceOpen
(
void
);
int
isCurrentAudioFormat
(
AudioFormat
*
audioFormat
);
int
isCurrentAudioFormat
(
const
AudioFormat
*
audioFormat
);
void
sendMetadataToAudioDevice
(
MpdTag
*
tag
);
...
...
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