Commit 581a1ead authored by Stéphane Letz's avatar Stéphane Letz
Browse files

AC3 code not compiled in ppc in JackCoreAudioDriver.

parent ade10a8d
......@@ -29,6 +29,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
namespace Jack
{
#ifndef __ppc__
JackAC3Encoder::JackAC3Encoder(const JackAC3EncoderParams& params)
{
......@@ -309,5 +311,7 @@ void JackAC3Encoder::GetChannelName(const char* name, const char* alias, char* p
sprintf(portname, "%s:%s:%s", name, alias, AC3_name);
}
}
#endif
} // end of namespace
\ No newline at end of file
......@@ -73,14 +73,24 @@ class JackAC3Encoder
void sample_move_dS_s16_24ph(jack_default_audio_sample_t* dst, char *src, jack_nframes_t nsamples, unsigned long src_skip);
public:
#ifdef __ppc__
JackAC3Encoder(const JackAC3EncoderParams& params) {}
virtual ~JackAC3Encoder() {}
bool Init(jack_nframes_t sample_rate) {return false;}
void Process(float** inputs, float** outputs, int nframes) {}
void GetChannelName(const char* name, const char* alias, char* portname, int channel) {}
#else
JackAC3Encoder(const JackAC3EncoderParams& params);
virtual ~JackAC3Encoder();
bool Init(jack_nframes_t sample_rate);
void Process(float** inputs, float** outputs, int nframes);
void GetChannelName(const char* name, const char* alias, char* portname, int channel);
#endif
};
typedef JackAC3Encoder * JackAC3EncoderPtr;
......
......@@ -6363,7 +6363,6 @@
isa = PBXProject;
buildConfigurationList = 4B699DD5097D427F00A18468 /* Build configuration list for PBXProject "Jackdmp" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
......@@ -11810,6 +11809,8 @@
"-DJACK_32_64",
);
OTHER_LDFLAGS = (
libaften_static.a,
libaften_pcm.a,
"-framework",
Jackservermp,
"-framework",
......@@ -16085,6 +16086,8 @@
OTHER_CFLAGS = "";
OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
OTHER_LDFLAGS = (
libaften_static.a,
libaften_pcm.a,
"-framework",
Jackservermp,
"-framework",
......@@ -16137,6 +16140,8 @@
OTHER_CFLAGS = "";
OTHER_CPLUSPLUSFLAGS = "-DMACH_RPC_MACH_SEMA";
OTHER_LDFLAGS = (
libaften_static.a,
libaften_pcm.a,
"-framework",
Jackservermp,
"-framework",
......
......@@ -604,7 +604,7 @@ OSStatus JackCoreAudioDriver::GetDefaultInputDevice(AudioDeviceID* id)
}
if (inDefault == 0) {
jack_error("Error: default input device is 0, please select a correct one !!");
jack_error("Error default input device is 0, please select a correct one !!");
return -1;
}
jack_log("JackCoreAudioDriver::GetDefaultInputDevice : input = %ld ", inDefault);
......@@ -623,7 +623,7 @@ OSStatus JackCoreAudioDriver::GetDefaultOutputDevice(AudioDeviceID* id)
}
if (outDefault == 0) {
jack_error("Error: default output device is 0, please select a correct one !!");
jack_error("Error default output device is 0, please select a correct one !!");
return -1;
}
jack_log("JackCoreAudioDriver::GetDefaultOutputDevice : output = %ld", outDefault);
......@@ -647,13 +647,13 @@ OSStatus JackCoreAudioDriver::GetTotalChannels(AudioDeviceID device, int& channe
err = AudioDeviceGetPropertyInfo(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, &outWritable);
if (err == noErr) {
int stream_count = outSize / sizeof(AudioBufferList);
jack_log(" JackCoreAudioDriver::GetTotalChannels stream_count = %d", stream_count);
jack_log("JackCoreAudioDriver::GetTotalChannels stream_count = %d", stream_count);
AudioBufferList bufferList[stream_count];
err = AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, bufferList);
if (err == noErr) {
for (uint i = 0; i < bufferList->mNumberBuffers; i++) {
channelCount += bufferList->mBuffers[i].mNumberChannels;
jack_log(" JackCoreAudioDriver::GetTotalChannels stream = %d channels = %d", i, bufferList->mBuffers[i].mNumberChannels);
jack_log("JackCoreAudioDriver::GetTotalChannels stream = %d channels = %d", i, bufferList->mBuffers[i].mNumberChannels);
}
}
}
......@@ -2465,6 +2465,7 @@ extern "C"
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "monitor", 'm', JackDriverParamBool, &value, NULL, "Provide monitor ports for the output", NULL);
#ifndef __ppc__
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "AC3-encoding", 'a', JackDriverParamBool, &value, NULL, "AC3 multi-channels encoding", NULL);
......@@ -2473,7 +2474,7 @@ extern "C"
value.i = 0;
jack_driver_descriptor_add_parameter(desc, &filler, "AC3-LFE", 'f', JackDriverParamBool, &value, NULL, "AC3 LFE channel", NULL);
#endif
value.i = TRUE;
jack_driver_descriptor_add_parameter(desc, &filler, "duplex", 'D', JackDriverParamBool, &value, NULL, "Provide both capture and playback ports", NULL);
......@@ -2586,10 +2587,11 @@ extern "C"
monitor = param->value.i;
break;
#ifndef __ppc__
case 'a':
ac3_encoding = param->value.i;
break;
case 'b':
ac3_bitrate = param->value.i;
break;
......@@ -2597,6 +2599,7 @@ extern "C"
case 'f':
ac3_lfe = param->value.i;
break;
#endif
case 'r':
srate = param->value.ui;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment