aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/osx_output_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-10-02OSX: Set mDataByteSize correctly on AudioBuffers during render.Gregory Smith1-3/+7
2012-03-21Fix the build on OSXRich Healey1-0/+1
2012-01-04output/osx: fix memory leak after AudioUnitSetProperty() failureMax Kellermann1-0/+1
2011-12-24output/osx: implement 32 bit playbackMax Kellermann1-2/+6
2011-12-24output/osx: allocate the device in enable()Max Kellermann1-102/+116
Keep the device open as long as the output is enabled, but initialize it only when playback starts.
2011-09-19output_plugin: the plugin allocates the audio_output objectMax Kellermann1-15/+22
Pass audio_output objects around instead of void pointers. This will give some more control to the plugin, and prepares for non-blocking audio outputs.
2011-09-17output: rename plugin variablesMax Kellermann1-1/+1
Consistent naming.
2011-09-17output: per-plugin headerMax Kellermann1-0/+1
Move the "extern" declarations from output_list.c, for more type safety.
2011-09-17output: rename plugin source filesMax Kellermann1-0/+0
2011-09-01output/osx: don't drain the buffer when closingMax Kellermann1-6/+0
Eliminate an unnecessary source of deadlocks.
2011-09-01output/osx: signal the GCond while mutex is lockedMax Kellermann1-1/+1
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-07output/osx: fix up audio format first, then apply it to deviceMax Kellermann1-9/+10
This is a MPD 0.16 regression: when playing a 24 bit file, the switch to 16 bit was made only partially, after mBytesPerPacket and mBytesPerFrame had already been applied. That means mBytesPerFrame referred to 24 bit, and mBitsPerChannel referred to 16 bits. Of course, that cannot work.
2010-12-21osx_output: always pass OS X result code to g_set_error().Greg Ward1-9/+9
Should be safe on OS X 10.4 (32-bit), since Apple's OSStatus boils down to "signed long", and g_set_error() takes gint, which is really just "int". Assigning "signed long" to "int" on 32-bit Unix should be just fine, since both are signed 32-bit ints. No idea if this is safe on 64-bit OS X.
2010-12-21osx_output: allow user to specify other audio devices.Greg Ward1-1/+119
Add new config parameter 'device' to audio_output type "osx": - if not supplied or set to "default", open default device - if set to "system", open system device - otherwise 'device' should be an audio device name: mpd will find and open the specified audio device, falling back to the default device if it's not found
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-4/+15
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-12include config.h in all sourcesMax Kellermann1-1/+2
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-09-20output/osx: fix the OS X 10.6 buildPatrik Weiskircher1-0/+1
Include CoreServices/CoreServices.h.
2009-09-20output/osx: fix the OS X 10.6 buildPatrik Weiskircher1-0/+1
Include CoreServices/CoreServices.h.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-26output_plugin: report errors with GErrorMax Kellermann1-12/+29
Use GLib's GError library for reporting output device failures. Note that some init() methods don't clean up properly after a failure, but that's ok for now, because the MPD core will abort anyway.
2009-02-26osx: use OSStatus and GetMacOSStatusCommentString()Max Kellermann1-15/+24
The return type of most OS X functions is OSStatus, not int. We can get a nice error message from GetMacOSStatusCommentString(), log it.
2009-02-26osx: start the audio device in the open() methodMax Kellermann1-17/+8
Don't call AudioOutputUnitStart() in the play() method, do it after the device has been opened. We can eliminate the "started" property now, because the device is always started when it's open.
2009-02-26osx: removed commented codeMax Kellermann1-23/+2
We don't need to keep commented code forever. If we want that test_default_device() implementation back one day, we'll pick it from the git history.
2009-02-26osx: no CamelCaseMax Kellermann1-89/+85
Renamed types, functions, variables.
2009-02-25output_plugin: don't pass audio_output object to method init()Max Kellermann1-2/+1
audio_output_get_name() has been removed, which was the only function left in output_api.h. The output plugin doesn't need the audio_output object at all, remove the parameter from the init() method.
2009-02-23output: pass the music chunk pointer as void*, not char*Max Kellermann1-2/+2
The meaning of the chunk depends on the audio format; don't suggest a specific format by declaring the pointer as "char*", pass "void*" instead.
2009-02-23output_api: play() returns a lengthMax Kellermann1-27/+18
The old API required an output plugin to not return until all data passed to the play() method is consumed. Some output plugins have to loop to fulfill that requirement, and may block during that. Simplify these, by letting them consume only part of the buffer: make play() return the length of the consumed data.
2009-02-19utils: use g_usleep() instead of my_usleep()Max Kellermann1-2/+1
Now that I've found this nice function in the GLib docs, we can finally remove our custom sleep function. Still all those callers of g_usleep() have to be migrated one day to use events, instead of regular polling.
2009-02-10osx: removed disabled debug messagesMax Kellermann1-43/+2
Nobody needs these debug messages anymore.
2009-01-25use g_free() instead of free()Max Kellermann1-3/+2
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
2009-01-25conf: const pointers in block get functionsMax Kellermann1-1/+1
All config_get_block_*() functions should accept constant config_param pointers.
2009-01-17conf: no CamelCase, part IMax Kellermann1-1/+1
Renamed functions, types, variables.
2009-01-05fix G_BYTE_ORDER checkMax Kellermann1-1/+1
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05use GLib byte order macrosMax Kellermann1-1/+1
2009-01-01output plugins: don't include gcc.hMax Kellermann1-6/+7
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-12-28osx_plugin: migrate from pthread to glib threadsThomas Jansen1-19/+18
2008-12-17Remove useless statement.Emanuele Giaquinta1-1/+0
2008-12-17Remove useless computation. After the pthread_cond_wait loop there are at ↵Emanuele Giaquinta1-2/+0
least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
2008-12-17Remove useless statement, curpos is initialized at the beginning of the loop.Emanuele Giaquinta1-1/+0
2008-12-17Factor computation.Emanuele Giaquinta1-4/+6
2008-12-17Use MIN.Emanuele Giaquinta1-2/+2
2008-12-17Call CloseComponent after AudioUnitUninitialize.Emanuele Giaquinta1-1/+1
2008-12-08osx: use 16 bit sample formatMax Kellermann1-0/+3
The OS X output does not seem to support 24 bit audio in the way MPD implements it currently. Fall back to 16 bit for now, and schedule 24 bit support on OS X for MPD 0.15.
2008-12-08osx: use GLib instead of utils.h/log.hMax Kellermann1-9/+13
One my_usleep() invocation remains, until we find out if we can delete it.
2008-12-08osx: don't use void pointer in arithmeticMax Kellermann1-2/+2
Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos". This fixes a gcc warning.
2008-11-04osx: fix gcc warningsMax Kellermann1-7/+8
Fix prototypes and unused variables.
2008-11-04osx: adapt to new output plugin APIMax Kellermann1-19/+15
The OS X output plugin wasn't adapted to the new output plugin yet, because I had no Mac to test...
2008-10-29output: use bool for return values and flagsMax Kellermann1-14/+15
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.