Ken Thomases : winecoreaudio: Remove some no-longer-used code.
Alexandre Julliard
julliard at winehq.org
Thu Jan 16 14:52:27 CST 2014
Module: wine
Branch: master
Commit: d3488325aec9ca6b2ef0a7212a194711cf4c96f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3488325aec9ca6b2ef0a7212a194711cf4c96f4
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Jan 15 13:47:25 2014 -0600
winecoreaudio: Remove some no-longer-used code.
---
dlls/winecoreaudio.drv/audiounit.c | 95 +-----------------------------------
1 file changed, 1 insertion(+), 94 deletions(-)
diff --git a/dlls/winecoreaudio.drv/audiounit.c b/dlls/winecoreaudio.drv/audiounit.c
index 6968719..b49d214 100644
--- a/dlls/winecoreaudio.drv/audiounit.c
+++ b/dlls/winecoreaudio.drv/audiounit.c
@@ -36,25 +36,8 @@
#include "wine/debug.h"
#ifndef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
-/* Define new AudioComponent Manager functions for compatibility's sake */
-typedef Component AudioComponent;
+/* Define new AudioComponent Manager types for compatibility's sake */
typedef ComponentDescription AudioComponentDescription;
-typedef ComponentInstance AudioComponentInstance;
-
-static inline AudioComponent AudioComponentFindNext(AudioComponent ac, AudioComponentDescription *desc)
-{
- return FindNextComponent(ac, desc);
-}
-
-static inline OSStatus AudioComponentInstanceNew(AudioComponent ac, AudioComponentInstance *aci)
-{
- return OpenAComponent(ac, aci);
-}
-
-static inline OSStatus AudioComponentInstanceDispose(AudioComponentInstance aci)
-{
- return CloseComponent(aci);
-}
#endif
#ifndef HAVE_AUGRAPHADDNODE
@@ -72,49 +55,6 @@ static inline OSStatus AUGraphNodeInfo(AUGraph graph, AUNode node, AudioComponen
WINE_DEFAULT_DEBUG_CHANNEL(wave);
WINE_DECLARE_DEBUG_CHANNEL(midi);
-static const char *streamDescription(const AudioStreamBasicDescription* stream)
-{
- return wine_dbg_sprintf("\n mSampleRate : %f\n mFormatID : %s\n mFormatFlags : %lX\n mBytesPerPacket : %lu\n mFramesPerPacket : %lu\n mBytesPerFrame : %lu\n mChannelsPerFrame : %lu\n mBitsPerChannel : %lu\n",
- stream->mSampleRate,
- wine_dbgstr_fourcc(stream->mFormatID),
- stream->mFormatFlags,
- stream->mBytesPerPacket,
- stream->mFramesPerPacket,
- stream->mBytesPerFrame,
- stream->mChannelsPerFrame,
- stream->mBitsPerChannel);
-}
-
-int AudioUnit_CloseAudioUnit(AudioUnit au)
-{
- OSStatus err = AudioComponentInstanceDispose(au);
- return (err == noErr);
-}
-
-int AudioUnit_InitializeWithStreamDescription(AudioUnit au, AudioStreamBasicDescription *stream)
-{
- OSStatus err = noErr;
-
- TRACE("input format: %s\n", streamDescription(stream));
-
- err = AudioUnitSetProperty(au, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
- 0, stream, sizeof(*stream));
-
- if (err != noErr)
- {
- ERR("AudioUnitSetProperty return an error %s\n", wine_dbgstr_fourcc(err));
- return 0;
- }
-
- err = AudioUnitInitialize(au);
- if (err != noErr)
- {
- ERR("AudioUnitInitialize return an error %s\n", wine_dbgstr_fourcc(err));
- return 0;
- }
- return 1;
-}
-
int AudioUnit_SetVolume(AudioUnit au, float left, float right)
{
OSStatus err = noErr;
@@ -150,39 +90,6 @@ int AudioUnit_GetVolume(AudioUnit au, float *left, float *right)
}
-/* FIXME: implement sample rate conversion on input */
-int AudioUnit_GetInputDeviceSampleRate(void)
-{
- AudioDeviceID defaultInputDevice;
- UInt32 param;
- AudioObjectPropertyAddress propertyAddress;
- Float64 sampleRate;
- OSStatus err;
-
- param = sizeof(defaultInputDevice);
- propertyAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;
- propertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
- propertyAddress.mElement = kAudioObjectPropertyElementMaster;
- err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &propertyAddress, 0, NULL, ¶m, &defaultInputDevice);
- if (err != noErr || defaultInputDevice == kAudioDeviceUnknown)
- {
- ERR("Couldn't get the default audio input device ID: %08lx\n", err);
- return 0;
- }
-
- param = sizeof(sampleRate);
- propertyAddress.mSelector = kAudioDevicePropertyNominalSampleRate;
- propertyAddress.mScope = kAudioDevicePropertyScopeInput;
- err = AudioObjectGetPropertyData(defaultInputDevice, &propertyAddress, 0, NULL, ¶m, &sampleRate);
- if (err != noErr)
- {
- ERR("Couldn't get the device sample rate: %08lx\n", err);
- return 0;
- }
-
- return sampleRate;
-}
-
/*
* MIDI Synth Unit
*/
More information about the wine-cvs
mailing list