From eb537f84f1ebcd508fded4f1a319a0da146a7fc4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Aug 2006 10:07:16 +0000 Subject: 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 --- src/audioOutput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audioOutput.h') 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); -- cgit v1.2.3