Commit Graph

51 Commits

Author SHA1 Message Date
Derk-Jan Hartman
b4392aff1e * Don't use alloca for audio buffers on OSX and BSD, because the stacksize on both isn't infinite.
This might explain the audio-core crashes we have seen in the past on Mac OS X 
* Fix issues with platforms which don't have alloca() (defined)
2006-02-17 16:15:50 +00:00
Derk-Jan Hartman
04c4f0c1b0 * This change should be better then the one in [14346] 2006-02-17 14:33:32 +00:00
Derk-Jan Hartman
2ce311a5d1 * stricter aout_BufferFree 2006-02-17 14:20:02 +00:00
Clément Stenac
5bd61a8060 Audio - Refs:#473 2006-01-21 14:14:36 +00:00
Antoine Cellerier
2cb472dba0 FSF address change. 2006-01-12 23:10:04 +00:00
Rémi Denis-Courmont
fe087a3828 Make Zorglub less unhappy 2005-07-09 06:17:09 +00:00
Rémi Denis-Courmont
85b29bdc28 Copyright fixes
(da big courmischage)
2005-07-08 18:12:44 +00:00
Gildas Bazin
d4164c2332 * include/aout_internal.h: fixed old memory leak when alloca() isn't available. 2005-01-07 09:54:01 +00:00
Gildas Bazin
9dd393c7e2 * include/aout_internal.h: added a b_restart field to aout_input_t.
* src/audio_output/input.c: simplified VisualizationCallback() and don't restart the aout inputs in there but rather set the b_restart flag so they automatically get restarted on the next aout_InputPlay().
2004-04-19 10:48:04 +00:00
Gildas Bazin
1e9f16e284 * ALL: final improvements to the decoders/packetizers api.
(There are still a few decoders/packetizers left to be converted but this shouldn't take too long).
* ALL: small improvements to the encoders api.
2003-11-16 21:07:31 +00:00
Gildas Bazin
5d8bdd3f4d * src/audio_output/dec.c: moved the audio desync option out of p_vlc so it can be modified on a per input basis. 2003-10-27 21:54:10 +00:00
Gildas Bazin
7d2ff7e2a1 * src/audio_output/dec.c, include/aout_internal.h: the aout core was
automatically discarding audio samples that were above AOUT_MAX_ADVANCE_TIME
in the future. Problem is that p_input->i_pts_delay isn't a fixed value. We
now fetch this value from the input thread when we create an aout_instance_t.
This solves problems with the http access plugin.
2003-03-06 23:10:11 +00:00
Gildas Bazin
75426e20e9 * modules/audio_filter/resampler/bandlimited.[ch]: new high-quality
bandlimited interpolation resampler.
   It is not yet enabled by default because it requires a bit more works
   (not fully stable yet because of buffer overflows under certain conditions).

* src/audio_output/input.c: the resamplers are now always active (expcept
   in spdif mode).

* modules/audio_filter/resampler/*: modified the resampler to return the
   input buffer when no resampling is needed.
2003-03-04 03:27:40 +00:00
Christophe Massiot
f055f01f00 * aout_Volume* functions now do their own vlc_object_find() on the
audio output. Consequently, the first argument can be any vlc_object_t.
* modules/gui/macosx/*: greatly simplified volume functions ; you can now
  call aout_Volume* even when there is no audio output, and the volume
  will be saved for later use.
2003-02-09 01:13:43 +00:00
Christophe Massiot
aeade697a0 Fixed a segfault with quitting when no audio output plug-in was found
(closes #108).
2003-01-23 17:13:28 +00:00
Christophe Massiot
ec518727fc * configure.ac.in: Disabled -Wtraditional as it produces much more bogus
warnings than real ones.
* audio output: New intf-change variable to know when audio-channels
  and audio-device have changed.
* video output: New intf-change variable and vout_VarCallback, to know
  when video-device has changed (OS X port).
* modules/gui/macosx/*: Menus for audio channels, implemented volume
  management, added a menu for screen selection.
2002-12-07 23:50:31 +00:00
Sam Hocevar
1b7ce2697e * ./src/*, ./include/*: fixed a bunch of badly initialized structures, a few
signed/unsigned comparisons, and removed trailing spaces here and there.
2002-12-06 10:10:40 +00:00
Christophe Massiot
8928554ebd Major change of the channels management. p_format->i_channels disappeares
and is replaced by two members : i_physical_channels and i_original_channels.
i_physical_channels describes the channels which are effectively present
in the stream (at the current point of the aout pipeline), whereas
i_original_channels represents the channels we used to constitute the
stream. For instance a mono stream (FRONT_CENTER) may emanate from a
FRONT_LEFT channel of a STEREO stream.

Additionally, this contains hooks to dynamically select the audio device
and the channels configuration. In order to do that, all aout plugins,
and all interface plug-ins need to be adapted. Currently only SDL
(partially OSS) and the rc interface have been adapted, please use them
as a guide. Other aout plug-ins have been temporarily disabled.

IMPORTANT : if you need a working sound output, DO NOT UPDATE YOUR TREE
for several days until we fix that.

* modules/misc/network/ipv4.c: Fixed a long-standing segfault when saving
  preferences and asking for multicast.
2002-11-14 22:38:48 +00:00
Sam Hocevar
d1296b32da * ./bootstrap: bootstrap now requires the --config flag. With no arguments
it simply outputs a usage message.
  * ./src/*: fixed a bunch of (legitimate) warnings under VC++.
  * ./evc/*, ./msvc/*: split the workspaces into three projects (libvlc, vlc
    and plugins -- plugins doesn't build anything yet).
2002-11-13 20:51:05 +00:00
Gildas Bazin
c0e8ae0766 * src/audio_output/filters.c, src/audio_output/input.c, include/aout_internal.h,
modules/audio_filter/resampler/*: Changes that allow the resamplers to set
   the start and end date of the frame it outputs.
   This allows us for instance to output a smaller frame than what we should, and
   keep the rest of the data to compute the resampling of the next frame.
   In short, we can implement much more complex resampling algorithms than before.

* modules/audio_filter/resampler/linear.c: rewrote the linear resampler. The audio
   quality doesn't seem to be better than the ugly resampler, maybe I shouldn't
   have wasted my time on this...
2002-11-11 22:27:01 +00:00
Sam Hocevar
bc061e8455 * ./include/*, ./src/*: separated WIN32 #tests and UNDER_CE #tests, because
WIN32 isn't always defined under WinCE, but might be. Grmbl.
  * ./include/*: changed a few u* and s* to uint*_t and int*_t.
2002-11-11 14:39:12 +00:00
Gildas Bazin
b4f932ad2f * src/audio_output/output.c: fixed another quality affecting bug.
* include/aout_internal.h src/audio_output/input.c: major change to the
   resampling algorithm. When resampling is requested to keep the audio stream
   synchronised to the main clock, we trigger it but we change the resampling
   rate only progressively so it doesn't get noticed too much by the listener.
2002-11-10 14:31:46 +00:00
Sam Hocevar
b628123009 * ./include/aout_internal.h: fixed a breakage I just introduced. 2002-11-09 18:28:36 +00:00
Sam Hocevar
05ac379f73 * ./Makefile.am: added a "update-vlc.dsp" rule to create the MSVC project
file from the makefile.
  * ./msvc/*: moved the MSVC files here.
  * ./src/extras/*: moved the extra code here (used to be in src/misc,
    extras/GNUgetopt and extras/Win32_msvc).
  * ./include/*: a few warning fixes.
2002-11-09 16:34:53 +00:00
Gildas Bazin
95efa0865f * src/audio_output/common.c, include/aout_internal.h: added a new function
aout_FifoFirstDate() that allows the aout plugin to schedule the first
   play.
* src/audio_output/output.c: fixed another problem affecting the audio quality.
* modules/audio_output/directx.c: improvements. The buffering scheme has been
   changed to be less affected by temporary starving. We also schedule the first   sample to play.
2002-11-01 15:06:23 +00:00
Gildas Bazin
ebbc5f8b0c * include/aout_internal.h: oops, forgot to commit this in my last changes. 2002-10-25 15:42:00 +00:00
Christophe Massiot
4e9d790036 * Added -mdynamic-no-pic to darwin CFLAGS (can you believe I actually read ./ :)
* Miscellaneous small fixes.
2002-10-22 23:08:00 +00:00
Christophe Massiot
cd816735c9 * Avoid overflowing the message queue with "audio output is starving"
messages,
* Updated BeOS and QNX outputs with respect to i_channels policy.
2002-10-21 20:00:10 +00:00
Christophe Massiot
54929735f8 * modules/demux/mpeg: Added DVB stream type for A/52 streams (0x6),
* include/vlc_threads.h: Avoid locking the interface,
* ALL: reworked all audio output plug-ins to correctly take into account
  i_channels. At present this is known to break OSS, probably others.
2002-10-20 12:23:48 +00:00
Christophe Massiot
ef6c706bde * Makefile.old: Fixed BeOS compilation.
* ALL: Fewer overhead when resampling.
2002-09-27 23:38:04 +00:00
Christophe Massiot
7a58ef70ff * Major API change of the audio output. New aout_Dec* functions.
* Fixed a compile issue in s16tofloat32swab.
* Fixed a typo in demux/mpeg/ts.c.
2002-09-26 22:40:27 +00:00
Christophe Massiot
d198a80352 * Fixed miscellaneous cosmetic issues with lpcm and s16tofloat32swab modules.
* First hooks for changing the audio output plug-in and its parameters
  on-the-fly.
2002-09-20 23:27:04 +00:00
Christophe Massiot
81442b6bf1 * Audio volume management now works properly. See src/audio_output/intf.c
for information on how to use it in your interface plug-ins. In the
  SDL vout, b and n are mapped to sound down/sound up.
* Fixed a major in the mad plug-in with wrong dates.
* Fixed a compilation bug.
2002-09-19 21:56:40 +00:00
Christophe Massiot
35b474003d * ALL: More hooks for audio volume management.
* configure.in: Fixed a typo.
2002-09-18 21:21:24 +00:00
Christophe Massiot
cf891bad55 * configure.in: Fixed detection of Qt-embedded.
* modules/codec/a52.c: Fixed detection of A/52 sound.
* modules/audio_filter/converter/a52tofloat32.c: Fixed a bug related to
  downmixing.
* ALL: Added hooks for audio volume management.
2002-09-16 20:46:38 +00:00
Christophe Massiot
96de1d1b35 Aout3 developer documentation, cont'd. 2002-09-06 23:15:44 +00:00
Christophe Massiot
34c71967f9 The liba52 "codec" is now an audio filter. It means we are now able to
autodetect S/PDIF hardware support and the audio output plug-in chooses
the best one. Of course it probably breaks existing output modules, see
oss.c for hints :).

Also include minor tweaks which will entitle us to decode and output 5.1
audio. It may break existing plug-ins, too. See
audio_output.c:aout_FormatNbChannels for hints.
2002-09-02 23:17:06 +00:00
Christophe Massiot
06996317f9 aout3 API change :
pf_setformat disappears (it was never called independantly of Open). If
the format needs to be changed, we will have Close/Open. This is much
simpler than before. Please check that I didn't break some plug-ins.
2002-08-30 23:27:06 +00:00
Christophe Massiot
0b88e7753a * demuxes: Worked around a bug in old VLC and VLS by changing TS stream types
(see my last mail).
* aout: Rewrote our whole lock policy. The output thread now doesn't require
  the mixer_lock, which might avoid delays. We will also be able to change
  the filter pipelines at runtime.
2002-08-30 22:22:24 +00:00
Sam Hocevar
51e9975309 * ./src/audio_output/output.c: reverted my previous aout_OutputNextBuffer
prototype change; it looks like we won't need it after all.
  * ./src/audio_output/output.c: if audio output is too slow, but we
    know there is no next packet, then we play it anyway. Rationale behind
    this is: better play a slightly wrongly dated packet than play silence,
    because it might be wrongly dated but there are chances it won't break
    audio continuity.
  * ./modules/audio_output/sdl.c: workaround for SDL's crap audio output
    system (callback gets called at random times, and no way to know the
    latency of the samples being played). Audio output is now rather good
    here, but please give feedback.
  * ./modules/audio_output/oss.c: we delay a bit before asking for a new
    buffer to avoid starvation.
2002-08-25 09:40:00 +00:00
Sam Hocevar
711160b2a2 * ./src/audio_output/output.c: added an argument to aout_OutputNextBuffer
which lets the audio output module give a timeout value for buffer
    delivery. This fixes a few issues with aout modules which were calling
    aout_OutputNextBuffer way too early.
2002-08-24 10:19:43 +00:00
Sam Hocevar
00724b734b * ./include/vlc_common.h: declared aout_fifo_t. 2002-08-21 23:19:58 +00:00
Sam Hocevar
a2c6740830 * ./include/aout_internal.h: exported aout_FifoPop to plugins. 2002-08-21 23:17:41 +00:00
Christophe Massiot
1c13a98745 Big round of fixes in the aout3.
* Audio and video should now _always_ be perfectly in sync.
* Changes in a52.c (end_date management) must be ported to other codecs,
  otherwise mixer errors will appear.
* Audio output plug-in can now tell whether they can handle a little
  clock drift (for instance, inserting zeroes after a pause).
2002-08-21 22:41:59 +00:00
Christophe Massiot
922ab4d4f4 More changes in the date handling. Should be more tolerant with
pause/play and change of audio channel.
2002-08-19 23:12:57 +00:00
Christophe Massiot
5ffbc97e75 * ./configure: Fixed double detection of gethostbyname.
* Major changes in the handling of dates in the audio output ; still buggy,
but differently.
* Fixed a major bug in the aout pre-filters, preventing to run any other
decoder than liba52.
* p_aout->output.pf_play now has only one argument.
2002-08-19 21:31:11 +00:00
Christophe Massiot
2f1be4f3e5 * Added a third argument to aout_OutputNextBuffer. In case the buffer
received does not start exactly at the given date, it indicates if the
  output plug-in is able to compensate for the drift (for instance on
  startup, or with S/PDIF packets), or if we need the aout core to
  resample the coming buffers. It is currently unimplemented.
2002-08-14 00:43:52 +00:00
Christophe Massiot
eb93d56d8d * Changed aout_FormatTo* ; aout_FormatToSize does no longer exist.
p_buffer now has a i_nb_bytes member. It is possible to indicate for a
  format its byterate (necessary for AC3 and SPDIF).
* S/PDIF output seems to be working at last (tested with the file output).
2002-08-14 00:23:59 +00:00
Christophe Massiot
8d5c85f26f * Fixed a variable overflow bug in the audio output.
* Prepared for some advances in the aout3 clock management.
* Added the first stone of the forthcoming stream output.
2002-08-12 22:12:51 +00:00
Sam Hocevar
7689bc9224 * ./modules/audio_output/oss.c: compilation fixes.
* ALL: lots of -ansi -pedantic fixes.
2002-08-08 00:35:11 +00:00