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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user