aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/shout_mp3.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shout_mp3: use audio_format_frame_size()Max Kellermann2009-02-101-2/+1
| | | | | Use audio_format_frame_size() instead of channels*audio_format_sample_size().
* shout: pass void pointer to the encoderMax Kellermann2009-02-101-2/+2
| | | | | | Pass the music chunk as a "const void *" to the encoder, instead of a "const char *". Actually, both encoders currently expect 16 bit samples, passing a 8-bit character is rather pointless.
* shout: clear buffer before calling the encoderMax Kellermann2009-02-091-3/+3
| | | | | | | Always assume the buffer is empty before calling the encoder. Always flush the buffer immediately after there has been added something. This reduces the risk of buffer overruns, because there will never be a "rest" in the current buffer.
* shout: don't postpone metadataMax Kellermann2009-02-091-1/+1
| | | | | Don't duplicate the tag received by the send_metadata() method - send it to the shout server directly.
* shout_mp3: call lame_close() in clear_encoder() methodMax Kellermann2009-02-021-2/+6
| | | | | | | | | | The shout_mp3 encoder had two bugs: when no song was ever played, MPD segfaulted during cleanup. Second bug: memory leak, each time the shout device was opened, lame_init() was called again, and lame_close() is only called once during shutdown. Fix this by shutting down LAME each time the clear_encoder() method is called.
* shout_mp3: free the lame_data struct on exitMax Kellermann2009-02-021-0/+2
| | | | | Make valgrind a little bit happier: free the global lame_data struct in the finish() method.
* shout: fixed the lame input buffer allocationMax Kellermann2008-11-301-9/+15
| | | | | | | | | | "float (*lamebuf)[2] = g_malloc()" does NOT allocate two float* buffers. The formula is even wrong: it should be applied to LAME's output buffer, not its input buffer. Converted "lamebuf" to the two variables "left" and "right", and allocate them independently with the exact buffer size. Set right=left if mono output is configured.
* shout_mp3: cast input buffer to int16_t*Max Kellermann2008-11-301-2/+2
| | | | It's easier to work with an int16_t* pointer here.
* shout: use GLib instead of utils.h/log.hMax Kellermann2008-11-251-14/+12
|
* output: don't compile plugins which are disabledMax Kellermann2008-10-261-5/+1
| | | | Don't compile the sources of disabled output plugins at all.
* renamed src/audioOutputs/ to src/output/Max Kellermann2008-10-261-0/+188
Again, no CamelCase in the directory name.