Commit graph

472 commits

Author SHA1 Message Date
Sam Lantinga
628262d3af indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403502
2009-01-14 04:25:32 +00:00
Sam Lantinga
e43f6d619e Fixed Visual C++ build
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403494
2009-01-12 08:46:28 +00:00
Ryan C. Gordon
fea75bcab7 First shot at new audio resampling code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403483
2009-01-11 04:46:42 +00:00
Ryan C. Gordon
8ca737d47a NULL-terminate the lists of autogenerated converters.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403482
2009-01-11 04:46:14 +00:00
Ryan C. Gordon
ed652245d1 Allow builds that reduce or eliminate the converters/resamplers.
We should probably give options to drop resamplers by channels, too, for
 developers that know they'll never need more than stereo, etc.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403481
2009-01-11 04:39:09 +00:00
Sam Lantinga
d123950aa3 Reverted Bob's indent checkin
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403475
2009-01-10 21:50:26 +00:00
Sam Lantinga
e32916c7f0 Fixed Visual C++ release build for Visual C++ 2005
* Some math functions become intrinsic in release mode, so we need to
  convert all the math functions into SDL math functions, like we did
  with the stdlib functions.
* Constant initializers of 8-bit values become calls to memset() in
  release mode, but memset() itself is an intrinsic when explicitly
  called.  So we'll just explicitly call memset() in those cases.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403474
2009-01-10 18:32:24 +00:00
Bob Pendleton
44fa7675c8 I ran a global "make indent" it modified the following files.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403473
2009-01-09 20:43:30 +00:00
Ryan C. Gordon
742f9c70bf First shot at autogenerated audio resamplers.
Don't check in a new SDL_audiotypecvt.c yet, though.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403470
2009-01-09 15:41:45 +00:00
Sam Lantinga
dc7d3c42a8 Fixed some dependency issues with SDL_revision.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403446
2009-01-04 05:41:52 +00:00
Sam Lantinga
7ed73609cf Fixed crash on Windows
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403441
2009-01-03 07:33:42 +00:00
Ryan C. Gordon
f62d6c171b Fixed off-by-one in audio converters, when growing a data type's size.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403418
2009-01-02 08:12:14 +00:00
Ryan C. Gordon
b96a3090e0 Avoid unnecessary assignment in generated audio type converters.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403417
2009-01-02 07:34:01 +00:00
Sam Lantinga
9e2744e7fa Date: Thu, 01 Jan 2009 21:32:12 +0100
From: Couriersud
Subject: Fusionsound audio driver

attached is a diff containing a audio driver for the FusionSound
library. This sound library is closely related to DirectFB and uses the
same transport (fusion) as DirectFB when running applications "remote",
i.e. over the network. As such, it natively redirects sound where
DirectFB redirects video. This may be handy for everyone using SDL over
DirectFB.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403409
2009-01-01 21:34:22 +00:00
Sam Lantinga
2191586507 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403404
2009-01-01 08:21:19 +00:00
Ryan C. Gordon
30768ab2aa Audio driver priority: favor PulseAudio and ALSA over OSS.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403401
2009-01-01 07:58:20 +00:00
Ryan C. Gordon
0e24b20c3b Adjusted default choice of audio driver.
If a driver can definitely see available devices, it is chosen. Otherwise,
 we'll take the first driver that initializes but saw no devices...this might
 be because it can't enumerate them, or there really aren't any available.

This prevents the dsp driver from hogging control when there are no /dev/dsp*
 nodes (for example, on a Linux box with ALSA and no OSS emulation).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403400
2009-01-01 07:54:58 +00:00
Sam Lantinga
60c39418a7 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403345
2008-12-20 08:41:05 +00:00
Ryan C. Gordon
b18cb0012e More resampling fixes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403343
2008-12-19 09:15:59 +00:00
Ryan C. Gordon
83de18855b Allocate SDL_AudioCVT::coeff before using it.
FIXME: this is a memory leak. We don't have an SDL_FreeAudioCVT() yet.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403342
2008-12-19 08:30:26 +00:00
Ryan C. Gordon
45ed26c3c2 Use SDL_zerop instead of SDL_memset.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403341
2008-12-19 06:43:41 +00:00
Ryan C. Gordon
d7d4dc4b7e Zero out SDL_AudioCVT struct before using it, to ensure it's all initialized.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403340
2008-12-19 06:01:03 +00:00
Sam Lantinga
170521f21e Fixed SDL 1.2 compatibility problem.
The API specifies that SDL_OpenAudio() will fill out the 'desired' audio spec
with the correct samples and size set by the driver.  This value is important
since it may be used by applications that size audio buffers, etc.

However, we want to allow advanced applications to call SDL_OpenAudioDevice()
which gets passed a const 'desired' parameter, and have the correct data filled
into the 'obtained' parameter, possibly allowing or not allowing format changes.

So... 'obtained' becomes the audio format the user callback is expected to use,
and we add flags to allow the application to specify which format changes are
allowed.

Note: We really need to add a way to query the 'obtained' audio spec.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403328
2008-12-13 06:36:47 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
a3c6362a20 Don't include <math.h> when HAVE_MATH_H isn't defined
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403225
2008-10-12 16:21:36 +00:00
Sam Lantinga
c6ac35a2bb Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403222
2008-10-04 06:46:59 +00:00
Sam Lantinga
809f6ba3b4 Updated Visual C++ build
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403216
2008-09-15 07:34:36 +00:00
Sam Lantinga
cd839b4bd3 Fixed a bunch of compile warnings on Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403191
2008-09-01 16:04:20 +00:00
Sam Lantinga
ede44c4b85 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403188
2008-08-27 15:10:03 +00:00
Sam Lantinga
5e73fc7c16 Fixed Visual Studio compilation problems
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403179
2008-08-26 07:34:49 +00:00
Sam Lantinga
0eeb8c92b6 Final merge of Google Summer of Code 2008 work...
Audio Ideas - Resampling and Pitch Shifting
by Aaron Wishnick, mentored by Ryan C. Gordon

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403165
2008-08-25 15:08:59 +00:00
Sam Lantinga
5678f51d85 Date: Wed, 14 Nov 2007 22:20:27 -0500
From: Calvin Vette
Subject: Fix to compile SDL-1.2 SVN on OS X Leopard

I found I needed to add a conditional check for Leopard to compile
cleanly on 1.2-SVN (20071114):

#include <AudioUnit/AudioUnit.h>
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
#include <AudioUnit/AUNTComponent.h>
#endif

where there is now just:
#include <AudioUnit/AudioUnit.h>

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402655
2007-12-28 18:16:42 +00:00
Sam Lantinga
a3e06251f2 Merged changeset 3463 from SDL 1.2, fixed compile error with Intel compiler.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402653
2007-12-28 18:08:43 +00:00
Sam Lantinga
fa9233eaca indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402638
2007-09-10 12:11:40 +00:00
Ryan C. Gordon
8e5b2416a4 Minor PulseAudio fixes: corrected OpenDevice return code, human-readable
error messages if connction to daemon fails.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402634
2007-08-20 02:08:37 +00:00
Ryan C. Gordon
c09d2e0f0d Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Fixes Bugzilla #439.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402633
2007-08-20 01:02:37 +00:00
Sam Lantinga
8acf15bdaa Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues

The current code will crash on exiting an application. The attached diff
fixes the issue.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402620
2007-08-17 02:54:12 +00:00
Patrice Mandin
5eb122882e Rename LockAudio,UnlockAudio to LockDevice,UnlockDevice. Also some small fixes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402518
2007-07-13 23:58:22 +00:00
Patrice Mandin
d53ee909be Missing include file
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402514
2007-07-13 22:51:42 +00:00
Ryan C. Gordon
1d89fd5fc7 Merged r3165:3166 from branches/SDL-1.2: gcc -Wall fix in arts audio target.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402437
2007-07-08 01:37:48 +00:00
Sam Lantinga
1be5906ea3 Removed campatibility behavior for 1.3
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402417
2007-07-05 04:34:48 +00:00
Ryan C. Gordon
409c8b5862 Merged r3138:3139 from branches/SDL-1.2: Don't init audio callback buffer.
(This already had a concession for devices opened via the 1.2 entry points,
 I've changed it to respect the environment variable and do it for all devices
 now.)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402412
2007-07-05 02:30:10 +00:00
Sam Lantinga
957d8bf377 stupid indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402404
2007-07-03 09:55:29 +00:00
Sam Lantinga
ed60e3a7d4 Fixes for compiling with Visual C++ 8.0 Express Edition
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402369
2007-06-19 05:53:56 +00:00
Ryan C. Gordon
d097a3fa1b Reworked r3067:3068 from branches/SDL-1.2: arts unavailable hardware bug fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402347
2007-06-14 14:22:54 +00:00
Sam Lantinga
19f18657f6 Fixed build issues on Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402322
2007-05-31 14:46:01 +00:00
Ryan C. Gordon
c34806796a Apparently it's possible that MSVC will want to call a built-in function to
bitshift an Sint64, but it can't find this function since we don't use the
 C runtime on Windows.

Division doesn't have this problem, though. Strange.

  Thanks, Suzuki Masahiro.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402242
2006-11-29 10:38:07 +00:00
Ryan C. Gordon
7f36032f22 Use SDL_strcmp(), not strcmp().
Thanks, Suzuki Masahiro.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402239
2006-11-29 10:26:32 +00:00
Ryan C. Gordon
a39f5c21f2 Merged r2906:2907 from 1.2 branch to trunk: power of two channels in dsp backend.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402230
2006-11-13 00:38:13 +00:00
Ryan C. Gordon
2a14d5cdca Fixed building of Windows waveout audio.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402228
2006-11-11 06:48:57 +00:00