aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-02-28socket_util: added function sockaddr_to_string()Max Kellermann2-0/+101
Create the socket_util.c library, the first function is sockaddr_to_string(): it converts a sockaddr struct to a string containing the IP address in a human-readable form.
2009-02-28update: use G_FILE_TEST_IS_REGULAR for archive filesMax Kellermann1-1/+6
When checking whether database entries have been deleted, don't check if an archive file is a directory (G_FILE_TEST_IS_DIR), use G_FILE_TEST_IS_REGULAR for this case instead. To determine if a "struct directory" is an archive, check for device==DEVICE_INARCHIVE. This is always false after loading the database, so this patch is not complete yet.
2009-02-28update: don't update unchanged archiveMax Kellermann1-1/+6
When the mtime of an archive time hasn't changed, don't update it again.
2009-02-28directory: added "mtime" propertyMax Kellermann3-3/+17
Remember the modification time of each directory. This is important for archives (which are virtual directories right now), but may also be useful for an automatic update mechanism.
2009-02-28update: moved code to update_archive_file()Max Kellermann1-31/+50
Simplify the rather large function update_regular_file().
2009-02-27directory: moved DIRECTORY_* string constantsMax Kellermann3-7/+9
Moved some of them to to directory_save.c, and others to database.c.
2009-02-27song_print: hide HTTP password in playlistMax Kellermann3-1/+52
Added the uri_remove_auth() library function which strips username and password from a HTTP URI, and use it in song_print_url(). This allows you to add HTTP URIs to the playlist including secret username and password, without disclosing it to all MPD clients.
2009-02-27client: removed duplicate "client" string from logMax Kellermann1-14/+14
Since we introduced a GLib logging domain, the "client" string appears twice in the log lines: client: client 0: command returned 0 Removed the second one, now it looks like this: client: [0] command returned 0 Still not quite good, but better than before.
2009-02-27update: print error when opendir() failsMax Kellermann1-2/+7
MPD used to be silent when it could stat() a directory, but could not opendir() it to read its contents. This caused a lot of support headache with users who have wrong file permissions. Add another warning message.
2009-02-27tag: don't accept invalid UTF-8 sequencesMax Kellermann1-5/+27
Overwrite invalid UTF-8 sequences with question marks.
2009-02-27tag: make tag.num_items unsignedMax Kellermann3-16/+6
There's no point in declaring num_items as a uint8_t, it doesn't save any space, due to padding. This allows us to lift the articial "255 items" limitation.
2009-02-27tag: no CamelCaseMax Kellermann13-65/+60
Renamed numOfItems to num_items.
2009-02-27tag: make tag_equal() return boolMax Kellermann2-13/+13
2009-02-26player_thread: removed meaningless warning on output failureMax Kellermann1-5/+0
The warning message "problems opening audio device while playing ..." does not help at all, and should be removed. At this point, the real error message has already been logged by the output thread.
2009-02-26output_all: print a warning when all outputs are disabledMax Kellermann1-1/+7
When all outputs are disabled, MPD printed only a meaningless message "problems opening audio device", although it didn't attempt to open a device.
2009-02-26output_all: removed "audio_outputs!=NULL" checkMax Kellermann1-3/+0
After initialization, audio_outputs is always non-NULL. Don't check that.
2009-02-26mvp: fixed default device detectionMax Kellermann1-1/+1
The check "open()!=0" is wrong, you have to write "open()>=0", because -1 means error, and 0 is a valid file handle.
2009-02-26output_plugin: report errors with GErrorMax Kellermann13-255/+443
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-26output_thread: use the right audio_format in assert()Max Kellermann1-1/+1
ao_play() gets PCM data in the in_audio_format, and converts it to out_audio_format. Comparing the input data with out_audio_format is wrong. prefixed with "STG:" will be automatically removed. STG: Trailing empty lines will be automatically removed. STG: vi: set textwidth=75 filetype=diff nobackup:
2009-02-26shout: use config_get_block_unsigned()Max Kellermann1-6/+3
Eliminated manual integer parsing.
2009-02-26pulse: removed pa_simple!=NULL checksMax Kellermann1-10/+2
The MPD core guarantees that the audio_output object is always consistent, and our pa_simple!=NULL checks are superfluous. Also don't manually close the device on error in pulse_play(), since the MPD core does this automatically when the play() method returns 0.
2009-02-26oss: moved code from oss_open() to oss_setup()Max Kellermann1-13/+26
Eliminate one label and a bunch of gotos.
2009-02-26oss: convert OSS_STAT_* to an enumMax Kellermann1-10/+15
Use C instead of CPP.
2009-02-26oss: return bool instead of intMax Kellermann1-10/+10
Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.
2009-02-26oss: use unsigned integersMax Kellermann1-14/+9
Convert the num_supported and num_unsupported variables from signed to unsigned.
2009-02-26oss: no CamelCaseMax Kellermann2-109/+127
Renamed types, functions and variables.
2009-02-26mixer: Add "disabled" mixer_type.Avuton Olrich2-0/+4
2009-02-25cmdline: Alphabetical help order like other GNU projects.Avuton Olrich1-6/+6
2009-02-25cmdline: Add --no-config to explicitly set daemon default options.Avuton Olrich1-2/+7
2009-02-25alsa: fall back to 16 bit audioMax Kellermann1-3/+8
When the sample format is unknown, fall back to 16 bit samples.
2009-02-25alsa: moved code from alsa_open() to alsa_setup()Max Kellermann1-32/+49
Simplify error handling a bit by moving some code into a separate function. This eliminates a good bunch of gotos, but that's not finished yet.
2009-02-25mvp: check for reopen errorsMax Kellermann1-2/+7
When the MVP device has been closed in the cancel() method, and the play() method attempts to reopen it, check for errors.
2009-02-25mvp: moved code to mvp_find_sample_rate()Max Kellermann1-9/+17
Moved the table lookup code to a separate function.
2009-02-25mvp: make the mvp_sample_rates array constMax Kellermann1-1/+1
The array must never be modified, it's a constant lookup table.
2009-02-25mvp: fall back to 16 bit audio samplesMax Kellermann1-1/+5
Looks like the MVP audio output only supports 16 and 24 bit audio samples. If MPD generates any other sample formats, force it to use 16 bit.
2009-02-25mvp: fall back to stereoMax Kellermann1-1/+5
When the channel count is greater than 2, fall back to stereo sound.
2009-02-25mvp: mvp_set_pcm_params() returns boolMax Kellermann1-9/+14
Return true/false instead of 0/-1. Also check its return value in mvp_output_open().
2009-02-25mvp: pass audio_format struct to mvp_set_pcm_params()Max Kellermann1-13/+23
Pass a pointer to the audio_format struct instead of 3 separate integers.
2009-02-25mvp: removed big_endian parameter from mvp_set_pcm_params()Max Kellermann1-16/+3
Don't pass the big_endian flag to mvp_set_pcm_params(), do a simple "G_BYTE_ORDER==G_LITTLE_ENDIAN" instead.
2009-02-25mvp: use G_N_ELEMENTS(mvp_sample_rates)Max Kellermann1-5/+2
Instead of manually calculating the number of elements in the mvp_sample_rates array, use GLib's convenience macro G_N_ELEMENTS().
2009-02-25mvp: no CamelCaseMax Kellermann2-36/+40
Renamed types, functions and variables.
2009-02-25output: audio_output_init() returns boolMax Kellermann2-5/+5
Return true/false instead of 1/0.
2009-02-25output: set a GLib log domainMax Kellermann3-0/+10
2009-02-25fifo: return bool valuesMax Kellermann1-12/+12
Return true/false for success/failure instead of returning 0/-1.
2009-02-25fifo: no CamelCaseMax Kellermann2-45/+52
Renamed types, functions and variables.
2009-02-25fifo: removed timer!=NULL checksMax Kellermann1-12/+1
The MPD core guarantees that the audio_output object is always consistent, and our timer!=NULL checks are superfluous.