Merge branch 'v0.18.x'
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -31,6 +31,7 @@ libtool
 | 
				
			|||||||
ltmain.sh
 | 
					ltmain.sh
 | 
				
			||||||
missing
 | 
					missing
 | 
				
			||||||
mkinstalldirs
 | 
					mkinstalldirs
 | 
				
			||||||
 | 
					/test-driver
 | 
				
			||||||
mpd
 | 
					mpd
 | 
				
			||||||
mpd.service
 | 
					mpd.service
 | 
				
			||||||
stamp-h1
 | 
					stamp-h1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								NEWS
									
									
									
									
									
								
							@@ -3,6 +3,16 @@ ver 0.19 (not yet released)
 | 
				
			|||||||
  - new commands "addtagid", "cleartagid"
 | 
					  - new commands "addtagid", "cleartagid"
 | 
				
			||||||
* new resampler option using libsoxr
 | 
					* new resampler option using libsoxr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ver 0.18.6 (not yet released)
 | 
				
			||||||
 | 
					* input
 | 
				
			||||||
 | 
					  - cdio_paranoia: support libcdio-paranoia 0.90
 | 
				
			||||||
 | 
					* output
 | 
				
			||||||
 | 
					  - openal: fix build failure on Mac OS X
 | 
				
			||||||
 | 
					  - osx: fix build failure
 | 
				
			||||||
 | 
					* mixer
 | 
				
			||||||
 | 
					  - alsa: fix build failure with uClibc
 | 
				
			||||||
 | 
					* accept files without metadata
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ver 0.18.5 (2013/11/23)
 | 
					ver 0.18.5 (2013/11/23)
 | 
				
			||||||
* configuration
 | 
					* configuration
 | 
				
			||||||
  - fix crash when db_file is configured without music_directory
 | 
					  - fix crash when db_file is configured without music_directory
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -827,6 +827,7 @@ MPD_AUTO_PKG(cdio_paranoia, CDIO_PARANOIA, [libcdio_paranoia],
 | 
				
			|||||||
if test x$enable_cdio_paranoia = xyes; then
 | 
					if test x$enable_cdio_paranoia = xyes; then
 | 
				
			||||||
	AC_DEFINE([ENABLE_CDIO_PARANOIA], 1,
 | 
						AC_DEFINE([ENABLE_CDIO_PARANOIA], 1,
 | 
				
			||||||
		[Define to enable libcdio_paranoia support])
 | 
							[Define to enable libcdio_paranoia support])
 | 
				
			||||||
 | 
						AC_CHECK_HEADERS(cdio/paranoia/paranoia.h)
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes)
 | 
					AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										131
									
								
								doc/mpd.conf.5
									
									
									
									
									
								
							
							
						
						
									
										131
									
								
								doc/mpd.conf.5
									
									
									
									
									
								
							@@ -316,137 +316,6 @@ errors on bandwidth-limited devices.  Some users have reported good results
 | 
				
			|||||||
with this set to 50000, but not all devices support values this high.  Most
 | 
					with this set to 50000, but not all devices support values this high.  Most
 | 
				
			||||||
users do not need to change this.  The default is 256000000 / sample_rate(kHz),
 | 
					users do not need to change this.  The default is 256000000 / sample_rate(kHz),
 | 
				
			||||||
or 5804 microseconds for CD-quality audio.
 | 
					or 5804 microseconds for CD-quality audio.
 | 
				
			||||||
.SH OPTIONAL OSS OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B device <dev>
 | 
					 | 
				
			||||||
This specifies the device to use for audio output.  The default is "/dev/dsp".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B mixer_device <mixer dev>
 | 
					 | 
				
			||||||
This specifies which mixer to use.  The default is "/dev/mixer".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B mixer_control <mixer ctrl>
 | 
					 | 
				
			||||||
This specifies which mixer control to use (sometimes referred to as the
 | 
					 | 
				
			||||||
"device").  The default is to use the main PCM mixer.  An example is "Pcm".
 | 
					 | 
				
			||||||
.SH OPTIONAL PULSE OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B server <server list>
 | 
					 | 
				
			||||||
A space separated list of servers to try to connect to.  See
 | 
					 | 
				
			||||||
<\fBhttp://www.pulseaudio.org/wiki/ServerStrings\fP> for more details.  The
 | 
					 | 
				
			||||||
default is to let PulseAudio choose a server.
 | 
					 | 
				
			||||||
If you specify more than one server name, MPD tries to connect to one
 | 
					 | 
				
			||||||
after another until it successfully establishes a connection.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B sink <sink>
 | 
					 | 
				
			||||||
The sink to output to.  The default is to let PulseAudio choose a sink.
 | 
					 | 
				
			||||||
.SH OPTIONAL JACK OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B client_name <name>
 | 
					 | 
				
			||||||
The client name to use when connecting to JACK.  The output ports <name>:left
 | 
					 | 
				
			||||||
and <name>:right will also be created for the left and right channels,
 | 
					 | 
				
			||||||
respectively.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B ports <left_port,right_port>
 | 
					 | 
				
			||||||
This specifies the left and right ports to connect to for the left and right
 | 
					 | 
				
			||||||
channels, respectively.  The default is to let JACK choose a pair of ports.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B ringbuffer_size <size in bytes>
 | 
					 | 
				
			||||||
This specifies the size of the ringbuffer in bytes.  The default is 32768.
 | 
					 | 
				
			||||||
.SH OPTIONAL AO OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B driver <driver>
 | 
					 | 
				
			||||||
This specifies the libao driver to use for audio output.  Possible values
 | 
					 | 
				
			||||||
depend on what libao drivers are available.  See
 | 
					 | 
				
			||||||
<\fBhttp://www.xiph.org/ao/doc/drivers.html\fP> for information on some
 | 
					 | 
				
			||||||
commonly used drivers.  Typical values for Linux include "oss" and "alsa09".
 | 
					 | 
				
			||||||
The default is "default", which causes libao to select an appropriate plugin.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B options <opts>
 | 
					 | 
				
			||||||
This specifies the options to use for the selected libao driver.  For oss, the
 | 
					 | 
				
			||||||
only option available is "dsp".  For alsa09, the available options are: "dev",
 | 
					 | 
				
			||||||
"buf_size", and "periods".  See <\fBhttp://www.xiph.org/ao/doc/drivers.html\fP>
 | 
					 | 
				
			||||||
for available options for some commonly used drivers.  Options are assigned
 | 
					 | 
				
			||||||
using "=", and ";" is used to separate options.  An example for oss:
 | 
					 | 
				
			||||||
"dsp=/dev/dsp".  An example for alsa09: "dev=hw:0,0;buf_size=4096".  The
 | 
					 | 
				
			||||||
default is "".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B write_size <size in bytes>
 | 
					 | 
				
			||||||
This specifies how many bytes to write to the audio device at once.  This
 | 
					 | 
				
			||||||
parameter is to work around a bug in older versions of libao on sound cards
 | 
					 | 
				
			||||||
with very small buffers.  The default is 1024.
 | 
					 | 
				
			||||||
.SH REQUIRED FIFO OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B path <path>
 | 
					 | 
				
			||||||
This specifies the path of the FIFO to output to.  Must be an absolute path.
 | 
					 | 
				
			||||||
If the path does not exist it will be created when mpd is started, and removed
 | 
					 | 
				
			||||||
when mpd is stopped.  The FIFO will be created with the same user and group as
 | 
					 | 
				
			||||||
mpd is running as.  Default permissions can be modified by using the builtin
 | 
					 | 
				
			||||||
shell command "umask".  If a FIFO already exists at the specified path it will
 | 
					 | 
				
			||||||
be reused, and will \fBnot\fP be removed when mpd is stopped.  You can use the
 | 
					 | 
				
			||||||
"mkfifo" command to create this, and then you may modify the permissions to
 | 
					 | 
				
			||||||
your liking.
 | 
					 | 
				
			||||||
.SH REQUIRED SHOUT OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B name <name>
 | 
					 | 
				
			||||||
This specifies not only the unique audio output name, but also the stream
 | 
					 | 
				
			||||||
title.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B host <hostname>
 | 
					 | 
				
			||||||
This specifies the hostname of the icecast server to connect to.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B port <port>
 | 
					 | 
				
			||||||
This specifies the port of the icecast server to connect to.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B mount <mountpoint>
 | 
					 | 
				
			||||||
This specifies the icecast mountpoint to use.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B password <password>
 | 
					 | 
				
			||||||
This specifies the password to use when logging in to the icecast server.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B quality <quality>
 | 
					 | 
				
			||||||
This specifies the encoding quality to use.  The value must be between 0
 | 
					 | 
				
			||||||
and 10.  Fractional values, such as 2.5, are permitted.  Either the quality or
 | 
					 | 
				
			||||||
the bitrate parameter must be specified, but not both.  For Ogg, a
 | 
					 | 
				
			||||||
higher quality number produces higher quality output.  For MP3, it's
 | 
					 | 
				
			||||||
just the opposite, with lower numbers producing higher quality output.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B bitrate <kbps>
 | 
					 | 
				
			||||||
This specifies the bitrate to use for encoding.  Either the quality or the
 | 
					 | 
				
			||||||
bitrate parameter must be specified, but not both.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B format <sample_rate:bits:channels>
 | 
					 | 
				
			||||||
This specifies the sample rate, bits per sample, and number of channels to use
 | 
					 | 
				
			||||||
for encoding.
 | 
					 | 
				
			||||||
.SH OPTIONAL SHOUT OUTPUT PARAMETERS
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B encoding <encoding>
 | 
					 | 
				
			||||||
This specifies which output encoding to use.  Should be either "ogg"
 | 
					 | 
				
			||||||
or "mp3",  "mp3" is needed for shoutcast streaming. The default is "ogg".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B protocol <protocol>
 | 
					 | 
				
			||||||
This specifies the protocol that wil be used to connect to the
 | 
					 | 
				
			||||||
icecast/shoutcast server. The options are "shoutcast", "icecast1" and
 | 
					 | 
				
			||||||
"icecast2". The default is "icecast2".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B user <username>
 | 
					 | 
				
			||||||
This specifies the username to use when logging in to the icecast server.  The
 | 
					 | 
				
			||||||
default is "source".
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B public <yes or no>
 | 
					 | 
				
			||||||
This specifies whether to request that the stream be listed in all public
 | 
					 | 
				
			||||||
stream directories that the icecast server knows about.  The default is no.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B timeout <seconds>
 | 
					 | 
				
			||||||
This specifies the number of seconds to wait before giving up on trying to
 | 
					 | 
				
			||||||
connect to the icecast server.  The default is 2 seconds.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B description <description>
 | 
					 | 
				
			||||||
This specifies a description of the stream.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B url <url>
 | 
					 | 
				
			||||||
This specifies a URL associated with the stream.
 | 
					 | 
				
			||||||
.TP
 | 
					 | 
				
			||||||
.B genre <genre>
 | 
					 | 
				
			||||||
This specifies the genre(s) of the stream.
 | 
					 | 
				
			||||||
.SH FILES
 | 
					.SH FILES
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.BI ~/.mpdconf
 | 
					.BI ~/.mpdconf
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										97
									
								
								doc/user.xml
									
									
									
									
									
								
							
							
						
						
									
										97
									
								
								doc/user.xml
									
									
									
									
									
								
							@@ -1555,6 +1555,59 @@ systemctl start mpd.socket</programlisting>
 | 
				
			|||||||
          The <varname>ao</varname> plugin uses the portable
 | 
					          The <varname>ao</varname> plugin uses the portable
 | 
				
			||||||
          <filename>libao</filename> library.
 | 
					          <filename>libao</filename> library.
 | 
				
			||||||
        </para>
 | 
					        </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <informaltable>
 | 
				
			||||||
 | 
					          <tgroup cols="2">
 | 
				
			||||||
 | 
					            <thead>
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>Setting</entry>
 | 
				
			||||||
 | 
					                <entry>Description</entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					            </thead>
 | 
				
			||||||
 | 
					            <tbody>
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  <varname>driver</varname>
 | 
				
			||||||
 | 
					                  <parameter>D</parameter>
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  The <filename>libao</filename> driver to use for
 | 
				
			||||||
 | 
					                  audio output.  Possible values depend on what libao
 | 
				
			||||||
 | 
					                  drivers are available.  See <ulink
 | 
				
			||||||
 | 
					                  url="http://www.xiph.org/ao/doc/drivers.html">http://www.xiph.org/ao/doc/drivers.html</ulink>
 | 
				
			||||||
 | 
					                  for information on some commonly used drivers.
 | 
				
			||||||
 | 
					                  Typical values for Linux include "oss" and "alsa09".
 | 
				
			||||||
 | 
					                  The default is "default", which causes libao to
 | 
				
			||||||
 | 
					                  select an appropriate plugin.
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  <varname>options</varname>
 | 
				
			||||||
 | 
					                  <parameter>O</parameter>
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  Options to pass to the selected
 | 
				
			||||||
 | 
					                  <filename>libao</filename> driver.
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  <varname>write_size</varname>
 | 
				
			||||||
 | 
					                  <parameter>O</parameter>
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  This specifies how many bytes to write to the audio
 | 
				
			||||||
 | 
					                  device at once.  This parameter is to work around a
 | 
				
			||||||
 | 
					                  bug in older versions of libao on sound cards with
 | 
				
			||||||
 | 
					                  very small buffers.  The default is 1024.
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					            </tbody>
 | 
				
			||||||
 | 
					          </tgroup>
 | 
				
			||||||
 | 
					        </informaltable>
 | 
				
			||||||
      </section>
 | 
					      </section>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <section>
 | 
					      <section>
 | 
				
			||||||
@@ -1565,6 +1618,38 @@ systemctl start mpd.socket</programlisting>
 | 
				
			|||||||
          FIFO (First In, First Out) file.  The data can be read by
 | 
					          FIFO (First In, First Out) file.  The data can be read by
 | 
				
			||||||
          another program.
 | 
					          another program.
 | 
				
			||||||
        </para>
 | 
					        </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <informaltable>
 | 
				
			||||||
 | 
					          <tgroup cols="2">
 | 
				
			||||||
 | 
					            <thead>
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>Setting</entry>
 | 
				
			||||||
 | 
					                <entry>Description</entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					            </thead>
 | 
				
			||||||
 | 
					            <tbody>
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  <varname>path</varname>
 | 
				
			||||||
 | 
					                  <parameter>P</parameter>
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  This specifies the path of the FIFO to write to.
 | 
				
			||||||
 | 
					                  Must be an absolute path.  If the path does not
 | 
				
			||||||
 | 
					                  exist, it will be created when MPD is started, and
 | 
				
			||||||
 | 
					                  removed when MPD is stopped.  The FIFO will be
 | 
				
			||||||
 | 
					                  created with the same user and group as MPD is
 | 
				
			||||||
 | 
					                  running as.  Default permissions can be modified by
 | 
				
			||||||
 | 
					                  using the builtin shell command "umask".  If a FIFO
 | 
				
			||||||
 | 
					                  already exists at the specified path it will be
 | 
				
			||||||
 | 
					                  reused, and will not be removed when MPD is stopped.
 | 
				
			||||||
 | 
					                  You can use the "mkfifo" command to create this, and
 | 
				
			||||||
 | 
					                  then you may modify the permissions to your liking.
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
 | 
					            </tbody>
 | 
				
			||||||
 | 
					          </tgroup>
 | 
				
			||||||
 | 
					        </informaltable>
 | 
				
			||||||
      </section>
 | 
					      </section>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <section>
 | 
					      <section>
 | 
				
			||||||
@@ -2040,6 +2125,18 @@ systemctl start mpd.socket</programlisting>
 | 
				
			|||||||
                  Defaults to 2 seconds.
 | 
					                  Defaults to 2 seconds.
 | 
				
			||||||
                </entry>
 | 
					                </entry>
 | 
				
			||||||
              </row>
 | 
					              </row>
 | 
				
			||||||
 | 
					              <row>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  <varname>protocol</varname>
 | 
				
			||||||
 | 
					                  <parameter>icecast2|icecast1|shoutcast</parameter>
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					                <entry>
 | 
				
			||||||
 | 
					                  Specifies the protocol that wil be used to connect
 | 
				
			||||||
 | 
					                  to the icecast/shoutcast server.  The default
 | 
				
			||||||
 | 
					                  is "<parameter>icecast2</parameter>".
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                </entry>
 | 
				
			||||||
 | 
					              </row>
 | 
				
			||||||
              <row>
 | 
					              <row>
 | 
				
			||||||
                <entry>
 | 
					                <entry>
 | 
				
			||||||
                  <varname>mount</varname>
 | 
					                  <varname>mount</varname>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -89,8 +89,7 @@ Song::UpdateFile()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	TagBuilder tag_builder;
 | 
						TagBuilder tag_builder;
 | 
				
			||||||
	if (!tag_file_scan(path_fs,
 | 
						if (!tag_file_scan(path_fs,
 | 
				
			||||||
			   &full_tag_handler, &tag_builder) ||
 | 
								   &full_tag_handler, &tag_builder))
 | 
				
			||||||
	    !tag_builder.IsDefined())
 | 
					 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tag_builder.IsEmpty())
 | 
						if (tag_builder.IsEmpty())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,6 +28,9 @@ struct tag_handler;
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * Scan the tags of a song file.  Invokes matching decoder plugins,
 | 
					 * Scan the tags of a song file.  Invokes matching decoder plugins,
 | 
				
			||||||
 * but does not invoke the special "APE" and "ID3" scanners.
 | 
					 * but does not invoke the special "APE" and "ID3" scanners.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @return true if the file was recognized (even if no metadata was
 | 
				
			||||||
 | 
					 * found)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
bool
 | 
					bool
 | 
				
			||||||
tag_file_scan(Path path,
 | 
					tag_file_scan(Path path,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -119,8 +119,7 @@ mpd_ffmpeg_stream_seek(void *opaque, int64_t pos, int whence)
 | 
				
			|||||||
	if (whence == AVSEEK_SIZE)
 | 
						if (whence == AVSEEK_SIZE)
 | 
				
			||||||
		return stream->input.size;
 | 
							return stream->input.size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Error error;
 | 
						if (!stream->input.LockSeek(pos, whence, IgnoreError()))
 | 
				
			||||||
	if (!stream->input.LockSeek(pos, whence, error))
 | 
					 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return stream->input.offset;
 | 
						return stream->input.offset;
 | 
				
			||||||
@@ -341,11 +340,9 @@ ffmpeg_probe(Decoder *decoder, InputStream &is)
 | 
				
			|||||||
		PADDING = 16,
 | 
							PADDING = 16,
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Error error;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	unsigned char buffer[BUFFER_SIZE];
 | 
						unsigned char buffer[BUFFER_SIZE];
 | 
				
			||||||
	size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE);
 | 
						size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE);
 | 
				
			||||||
	if (nbytes <= PADDING || !is.LockRewind(error))
 | 
						if (nbytes <= PADDING || !is.LockRewind(IgnoreError()))
 | 
				
			||||||
		return nullptr;
 | 
							return nullptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* some ffmpeg parsers (e.g. ac3_parser.c) read a few bytes
 | 
						/* some ffmpeg parsers (e.g. ac3_parser.c) read a few bytes
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,12 @@
 | 
				
			|||||||
#include <glib.h>
 | 
					#include <glib.h>
 | 
				
			||||||
#include <assert.h>
 | 
					#include <assert.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_CDIO_PARANOIA_PARANOIA_H
 | 
				
			||||||
 | 
					#include <cdio/parannoia/paranoia.h>
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
#include <cdio/paranoia.h>
 | 
					#include <cdio/paranoia.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <cdio/cd_types.h>
 | 
					#include <cdio/cd_types.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct CdioParanoiaInputStream {
 | 
					struct CdioParanoiaInputStream {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,7 @@
 | 
				
			|||||||
#include "Main.hxx"
 | 
					#include "Main.hxx"
 | 
				
			||||||
#include "event/MultiSocketMonitor.hxx"
 | 
					#include "event/MultiSocketMonitor.hxx"
 | 
				
			||||||
#include "event/Loop.hxx"
 | 
					#include "event/Loop.hxx"
 | 
				
			||||||
 | 
					#include "event/Call.hxx"
 | 
				
			||||||
#include "util/ASCII.hxx"
 | 
					#include "util/ASCII.hxx"
 | 
				
			||||||
#include "util/ReusableArray.hxx"
 | 
					#include "util/ReusableArray.hxx"
 | 
				
			||||||
#include "util/Error.hxx"
 | 
					#include "util/Error.hxx"
 | 
				
			||||||
@@ -46,7 +47,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor {
 | 
				
			|||||||
public:
 | 
					public:
 | 
				
			||||||
	AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
 | 
						AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
 | 
				
			||||||
		:MultiSocketMonitor(_loop), mixer(_mixer) {
 | 
							:MultiSocketMonitor(_loop), mixer(_mixer) {
 | 
				
			||||||
		_loop.AddCall([this](){ InvalidateSockets(); });
 | 
							BlockingCall(_loop, [this](){ InvalidateSockets(); });
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -363,7 +363,7 @@ osx_output_open(struct audio_output *ao, AudioFormat &audio_format,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	OSStatus status = AudioUnitInitialize(od->au);
 | 
						OSStatus status = AudioUnitInitialize(od->au);
 | 
				
			||||||
	if (status != noErr) {
 | 
						if (status != noErr) {
 | 
				
			||||||
		error.Set(osx_output_domain, status,
 | 
							error.Format(osx_output_domain, status,
 | 
				
			||||||
			     "Unable to initialize OS X audio unit: %s",
 | 
								     "Unable to initialize OS X audio unit: %s",
 | 
				
			||||||
			     GetMacOSStatusCommentString(status));
 | 
								     GetMacOSStatusCommentString(status));
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <glib.h>
 | 
					#include <glib.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef HAVE_OSX
 | 
					#ifndef __APPLE__
 | 
				
			||||||
#include <AL/al.h>
 | 
					#include <AL/al.h>
 | 
				
			||||||
#include <AL/alc.h>
 | 
					#include <AL/alc.h>
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user