diff options
author | Eric Wong <normalperson@yhbt.net> | 2006-08-01 10:07:16 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2006-08-01 10:07:16 +0000 |
commit | eb537f84f1ebcd508fded4f1a319a0da146a7fc4 (patch) | |
tree | bfa2ca32d530d175dc5ffe3a8acdba10a10d6550 /src/audioOutput.h | |
parent | b0965c317babb7d25b3d42241788661b94c59fa2 (diff) | |
download | mpd-eb537f84f1ebcd508fded4f1a319a0da146a7fc4.tar.gz mpd-eb537f84f1ebcd508fded4f1a319a0da146a7fc4.tar.xz mpd-eb537f84f1ebcd508fded4f1a319a0da146a7fc4.zip |
audio: malloc reductions
Just malloc all of the audioOutput array in one shot
to avoid fragmentation and to improve cache locality
when iterating through the array.
We also know name and type members of the AudioOutput
struct won't change in the config, so there's no
need to strdup them.
newAudioOutput => initAudioOutput
git-svn-id: https://svn.musicpd.org/mpd/trunk@4515 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutput.h')
-rw-r--r-- | src/audioOutput.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audioOutput.h b/src/audioOutput.h index 33f53b928..192c93270 100644 --- a/src/audioOutput.h +++ b/src/audioOutput.h @@ -101,7 +101,7 @@ void finishAudioOutputPlugins(); void loadAudioOutputPlugin(AudioOutputPlugin * audioOutputPlugin); void unloadAudioOutputPlugin(AudioOutputPlugin * audioOutputPlugin); -AudioOutput *newAudioOutput(ConfigParam * param); +int initAudioOutput(AudioOutput *, ConfigParam * param); int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat); int playAudioOutput(AudioOutput * audioOutput, char *playChunk, int size); void dropBufferedAudioOutput(AudioOutput * audioOutput); |