Commit Graph

272 Commits

Author SHA1 Message Date
Sam Lantinga
765fb4319c indent 2009-01-14 04:25:32 +00:00
Sam Lantinga
00db62df34 Fixed Visual C++ build 2009-01-12 08:46:28 +00:00
Ryan C. Gordon
7b1b655f97 First shot at new audio resampling code. 2009-01-11 04:46:42 +00:00
Ryan C. Gordon
691269eeef NULL-terminate the lists of autogenerated converters. 2009-01-11 04:46:14 +00:00
Ryan C. Gordon
9d2f640b65 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.
2009-01-11 04:39:09 +00:00
Sam Lantinga
19b003367c Reverted Bob's indent checkin 2009-01-10 21:50:26 +00:00
Sam Lantinga
22938ecdfb 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.
2009-01-10 18:32:24 +00:00
Bob Pendleton
68ff2ab932 I ran a global "make indent" it modified the following files. 2009-01-09 20:43:30 +00:00
Ryan C. Gordon
1ddbabe312 First shot at autogenerated audio resamplers.
Don't check in a new SDL_audiotypecvt.c yet, though.
2009-01-09 15:41:45 +00:00
Sam Lantinga
a2acb16266 Fixed some dependency issues with SDL_revision.h 2009-01-04 05:41:52 +00:00
Sam Lantinga
c1137076fc Fixed crash on Windows 2009-01-03 07:33:42 +00:00
Ryan C. Gordon
f39707fb6c Fixed off-by-one in audio converters, when growing a data type's size. 2009-01-02 08:12:14 +00:00
Ryan C. Gordon
b0a587ce40 Avoid unnecessary assignment in generated audio type converters. 2009-01-02 07:34:01 +00:00
Sam Lantinga
f4135a38db 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.
2009-01-01 21:34:22 +00:00
Sam Lantinga
6c7b800444 indent 2009-01-01 08:21:19 +00:00
Ryan C. Gordon
b0ba20156b Audio driver priority: favor PulseAudio and ALSA over OSS. 2009-01-01 07:58:20 +00:00
Ryan C. Gordon
0f0a6bb19c 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).
2009-01-01 07:54:58 +00:00
Sam Lantinga
daf038ecc4 indent 2008-12-20 08:41:05 +00:00
Ryan C. Gordon
e0728d1927 More resampling fixes. 2008-12-19 09:15:59 +00:00
Ryan C. Gordon
29777ee64b Allocate SDL_AudioCVT::coeff before using it.
FIXME: this is a memory leak. We don't have an SDL_FreeAudioCVT() yet.
2008-12-19 08:30:26 +00:00
Ryan C. Gordon
809690101a Use SDL_zerop instead of SDL_memset. 2008-12-19 06:43:41 +00:00
Ryan C. Gordon
59c33d9a0b Zero out SDL_AudioCVT struct before using it, to ensure it's all initialized. 2008-12-19 06:01:03 +00:00
Sam Lantinga
c5a8886195 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.
2008-12-13 06:36:47 +00:00
Sam Lantinga
befb0f7f42 Updated copyright date 2008-12-08 00:27:32 +00:00
Sam Lantinga
24fa5e3a47 Don't include <math.h> when HAVE_MATH_H isn't defined 2008-10-12 16:21:36 +00:00
Sam Lantinga
92c3984118 Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
2008-10-04 06:46:59 +00:00
Sam Lantinga
e6e45a547d Updated Visual C++ build 2008-09-15 07:34:36 +00:00
Sam Lantinga
72d3929fca Fixed a bunch of compile warnings on Mac OS X 2008-09-01 16:04:20 +00:00
Sam Lantinga
9c4b835e49 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
2008-08-27 15:10:03 +00:00
Sam Lantinga
a7f2971180 Fixed Visual Studio compilation problems 2008-08-26 07:34:49 +00:00
Sam Lantinga
a13381a54a Final merge of Google Summer of Code 2008 work...
Audio Ideas - Resampling and Pitch Shifting
by Aaron Wishnick, mentored by Ryan C. Gordon
2008-08-25 15:08:59 +00:00
Sam Lantinga
fef51d48dc 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>
2007-12-28 18:16:42 +00:00
Sam Lantinga
a594a0739d Merged changeset 3463 from SDL 1.2, fixed compile error with Intel compiler. 2007-12-28 18:08:43 +00:00
Sam Lantinga
1e891ee4f2 indent 2007-09-10 12:11:40 +00:00
Ryan C. Gordon
8446fb5976 Minor PulseAudio fixes: corrected OpenDevice return code, human-readable
error messages if connction to daemon fails.
2007-08-20 02:08:37 +00:00
Ryan C. Gordon
76eb0e6b90 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Fixes Bugzilla #439.
2007-08-20 01:02:37 +00:00
Sam Lantinga
785b4a61c3 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.
2007-08-17 02:54:12 +00:00
Patrice Mandin
2e5f27ad54 Rename LockAudio,UnlockAudio to LockDevice,UnlockDevice. Also some small fixes 2007-07-13 23:58:22 +00:00
Patrice Mandin
13f058d4eb Missing include file 2007-07-13 22:51:42 +00:00
Ryan C. Gordon
2d8bb10980 Merged r3165:3166 from branches/SDL-1.2: gcc -Wall fix in arts audio target. 2007-07-08 01:37:48 +00:00
Sam Lantinga
df1fb188b1 Removed campatibility behavior for 1.3 2007-07-05 04:34:48 +00:00
Ryan C. Gordon
55bedc2819 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.)
2007-07-05 02:30:10 +00:00
Sam Lantinga
803256bf09 stupid indent 2007-07-03 09:55:29 +00:00
Sam Lantinga
c02a69953d Fixes for compiling with Visual C++ 8.0 Express Edition 2007-06-19 05:53:56 +00:00
Ryan C. Gordon
f9c61022d2 Reworked r3067:3068 from branches/SDL-1.2: arts unavailable hardware bug fix. 2007-06-14 14:22:54 +00:00
Sam Lantinga
defc2572f2 Fixed build issues on Mac OS X 2007-05-31 14:46:01 +00:00
Ryan C. Gordon
4b1c92befb 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.
2006-11-29 10:38:07 +00:00
Ryan C. Gordon
ca8a1cb794 Use SDL_strcmp(), not strcmp().
Thanks, Suzuki Masahiro.
2006-11-29 10:26:32 +00:00
Ryan C. Gordon
5f1123d8ed Merged r2906:2907 from 1.2 branch to trunk: power of two channels in dsp backend. 2006-11-13 00:38:13 +00:00
Ryan C. Gordon
b932761626 Fixed building of Windows waveout audio. 2006-11-11 06:48:57 +00:00