Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > f967f5f6a1d8dc0ff357a43370aaad92 > files > 13

armstrong-0.2.6-11.fc13.src.rpm

diff -rupN armstrong.old/src/libzzub/ccm.cpp armstrong/src/libzzub/ccm.cpp
--- armstrong.old/src/libzzub/ccm.cpp	2009-01-09 16:17:44.000000000 -0500
+++ armstrong/src/libzzub/ccm.cpp	2009-02-26 23:33:28.000000000 -0500
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fi
 #include <algorithm>
 #include <iostream>
 #include <sstream>
-#include "../minizip/unzip.h"
-#include "../minizip/zip.h"
+#include <unzip.h>
+#include <zip.h>
 #include "FLAC/all.h"
 
 #include "ccm.h"
@@ -1049,7 +1049,7 @@ bool CcmWriter::save(std::string fileNam
 }
 
 
-static FLAC__StreamEncoderWriteStatus flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data) {
+static FLAC__StreamEncoderWriteStatus flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) {
 	zzub::outstream* writer=(zzub::outstream*)client_data;
 
     writer->write((void*)buffer, sizeof(FLAC__byte)*bytes);
@@ -1086,7 +1086,7 @@ struct DecoderInfo {
 // buffer can hold. The callback may choose to supply less data and modify the byte count
 // but must be careful not to overflow the buffer. The callback then returns a status code
 // chosen from FLAC__StreamDecoderReadStatus.
-static FLAC__StreamDecoderReadStatus flac_stream_decoder_read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data) {
+static FLAC__StreamDecoderReadStatus flac_stream_decoder_read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) {
 	DecoderInfo* info = (DecoderInfo*)client_data;
 
 	if (info->reader->position() >= info->reader->size()-1) return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
@@ -1139,19 +1139,20 @@ void flac_stream_decoder_error_callback(
 void decodeFLAC(zzub::instream* reader, zzub::player& player, int wave, int level) {
 
     FLAC__StreamDecoder* stream=FLAC__stream_decoder_new();
-    FLAC__stream_decoder_set_read_callback(stream, flac_stream_decoder_read_callback);
-    FLAC__stream_decoder_set_write_callback(stream, flac_stream_decoder_write_callback);
-    FLAC__stream_decoder_set_metadata_callback(stream, flac_stream_decoder_metadata_callback);
-    FLAC__stream_decoder_set_error_callback(stream, flac_stream_decoder_error_callback);
 
     DecoderInfo decoder_info;
     decoder_info.reader = reader;
-    FLAC__stream_decoder_set_client_data(stream, &decoder_info);
 
     // we're not intersted in meitadeita
     FLAC__stream_decoder_set_metadata_ignore_all(stream);
 
-    FLAC__stream_decoder_init(stream);
+    FLAC__stream_decoder_init_stream(stream,
+          flac_stream_decoder_read_callback,
+          NULL, NULL, NULL, NULL,
+          flac_stream_decoder_write_callback,
+          flac_stream_decoder_metadata_callback,
+          flac_stream_decoder_error_callback,
+          &decoder_info);
 //    FLAC__stream_decoder_process_single(stream);
     FLAC__stream_decoder_process_until_end_of_stream(stream);
     
@@ -1216,11 +1217,12 @@ bool encodeFLAC(zzub::outstream* writer,
 	FLAC__stream_encoder_set_bits_per_sample(stream, bps);
 	FLAC__stream_encoder_set_sample_rate(stream, sample_rate);
 	FLAC__stream_encoder_set_total_samples_estimate(stream, num_samples);
-	FLAC__stream_encoder_set_write_callback(stream, flac_stream_encoder_write_callback);
-	FLAC__stream_encoder_set_metadata_callback(stream, flac_stream_encoder_metadata_callback);
-	FLAC__stream_encoder_set_client_data(stream, writer);
+	int result = FLAC__stream_encoder_init_stream(stream,
+                                                      flac_stream_encoder_write_callback,
+				                      NULL,
+				                      NULL,
+				                      flac_stream_encoder_metadata_callback, writer);
 
-	int result = FLAC__stream_encoder_init(stream);
 	// if this fails, we want it to crash hard - or else will cause dataloss
 	assert(result == FLAC__STREAM_ENCODER_OK);
 
diff -rupN armstrong.old/src/libzzub/ccm.h armstrong/src/libzzub/ccm.h
--- armstrong.old/src/libzzub/ccm.h	2009-01-09 16:17:44.000000000 -0500
+++ armstrong/src/libzzub/ccm.h	2009-02-26 23:33:28.000000000 -0500
@@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fi
 
 #pragma once
 
-#include "../minizip/unzip.h"
-#include "../minizip/zip.h"
+#include <unzip.h>
+#include <zip.h>
 
 #include "pugixml.hpp"
 
diff -rupN armstrong.old/src/libzzub/SConscript armstrong/src/libzzub/SConscript
--- armstrong.old/src/libzzub/SConscript	2009-01-09 16:17:44.000000000 -0500
+++ armstrong/src/libzzub/SConscript	2009-02-26 23:34:07.000000000 -0500
@@ -57,24 +57,15 @@ files = [
 	'thread_id.cpp',
 ]
 
-# we build from our private flac,
-# since some are using 1.1.3, and that
-# one breaks a few things.
+# use internal flac support
+localenv.ParseConfig('pkg-config --libs flac')
+
+# minizip, zlib and flac dependencies
+localenv.ParseConfig('pkg-config --libs minizip')
 localenv.Append(CPPPATH=[
-	"${ROOTPATH}/src/flac/include"
+        '${PREFIX}/include/minizip'
 ])
-localenv.Append(CCFLAGS=[
-	'-DFLAC__NO_DLL',
-])
-env.SConscript("${ROOTPATH}/src/flac/src/libFLAC/SConscript")
 
-# minizip, zlib and flac dependencies
-files += [
-	'${MINIZIP_SRC_PATH}/ioapi.c',
-	'${MINIZIP_SRC_PATH}/mztools.c',
-	'${MINIZIP_SRC_PATH}/unzip.c',
-	'${MINIZIP_SRC_PATH}/zip.c',
-]
 if win32:
 	# build from our private zlib
 	localenv.Append(CPPPATH=["${ROOTPATH}/src/zlib"])
@@ -90,8 +81,10 @@ if mac:
 	])
 
 localenv.Append(LIBS=[
-	'FLAC',
 	'z',
+	'c',
+	'portmidi',
+	'porttime',
 ])
 
 localenv.Append(CCFLAGS=['-D_LIB','-D_LIBZZUB'])
@@ -126,19 +119,7 @@ if localenv['SNDFILE']:
 	])
 
 if localenv['RUBBERBAND']:
-	localenv.SConscript('../rubberband/SConscript')
-	localenv.Append(LIBS=[
-		'rubberband_static',
-		'fftw3',
-		'samplerate',
-		'fftw3f',
-	])
-	localenv.Append(CPPPATH=[
-		'../rubberband',
-	])
-	localenv.Append(CCFLAGS=[
-		'-DUSE_RUBBERBAND',
-	])
+	localenv.ParseConfig('pkg-config --libs rubberband')
 
 if localenv['BUZZ2ZZUB'] == True:
 	localenv.Append(CCFLAGS=[
@@ -146,25 +127,11 @@ if localenv['BUZZ2ZZUB'] == True:
 	])
 
 # portmidi support
-localenv.Append(CPPPATH=[
-	'${PORTMIDI_SRC_PATH}/pm_common',
-	'${PORTMIDI_SRC_PATH}/porttime'
-])
 
 if posix:
 	# porttime and portmidi
-	files += [
-			'${PORTMIDI_SRC_PATH}/porttime/porttime.c',
-			'${PORTMIDI_SRC_PATH}/pm_common/pmutil.c',
-			'${PORTMIDI_SRC_PATH}/pm_common/portmidi.c',
-	]
-
+	
 	if localenv['COREAUDIO'] == True:
-		files += [
-			'${PORTMIDI_SRC_PATH}/pm_mac/pmmac.c', 
-			'${PORTMIDI_SRC_PATH}/pm_mac/pmmacosxcm.c',
-			'${PORTMIDI_SRC_PATH}/porttime/ptmacosx_cf.c',
-		]
 		localenv.Append(LINKFLAGS=[
 			'-framework', 'CoreMIDI',
 			'-framework', 'CoreFoundation',
@@ -175,16 +142,12 @@ if posix:
 			'-DNEWBUFFER'
 		])
 	else:
-		files += [
-			'${PORTMIDI_SRC_PATH}/porttime/ptlinux.c',
-			'${PORTMIDI_SRC_PATH}/pm_linux/pmlinux.c',
-		]
 		localenv.Append(CCFLAGS=[
 			'-DPM_CHECK_ERRORS',
 			'-DNEWBUFFER'
 		])
 		if localenv["ALSA"] == True:
-			files += [ '${PORTMIDI_SRC_PATH}/pm_linux/pmlinuxalsa.c' ]
+			#files += [ '${PORTMIDI_SRC_PATH}/pm_linux/pmlinuxalsa.c' ]
 			localenv.Append(LIBS=[ 'asound', ])
 			localenv.Append(CCFLAGS=[ '-DPMALSA', ])
 
@@ -326,26 +289,14 @@ if localenv['AUDIOENGINE'] == 'rtaudio':
 		'-DUSE_RTAUDIO',
 	])
 
-	localenv.SConscript('../rtaudio/SConscript')
 	localenv.Append(LIBS=[
-		'rtaudio_static',
+		'rtaudio',
 	])
+
 	localenv.Append(CPPPATH=[
-		'../rtaudio',
+		'${PREFIX}/include',
 	])
 
-	if env['MP3'] == True:
-		localenv.SConscript('../libmad/SConscript')
-		localenv.Append(LIBS=[
-			'libmad_static',
-		])
-		localenv.Append(CPPPATH=[
-			'../libmad',
-		])
-		localenv.Append(CCFLAGS=[
-			'-DUSE_LIBMAD',
-		])
-
 	if win32:
 		localenv.Append(CCFLAGS=[
 			'-D__WINDOWS_ASIO__',
@@ -373,6 +324,7 @@ if localenv['AUDIOENGINE'] == 'rtaudio':
 		localenv.Append(LIBS=[
 			'pthread',
 			'm',
+			'rtaudio',
 		])
 
 #######################################
diff -rupN armstrong.old/src/plugins/lunar/SConscript armstrong/src/plugins/lunar/SConscript
--- armstrong.old/src/plugins/lunar/SConscript	2009-01-09 16:17:45.000000000 -0500
+++ armstrong/src/plugins/lunar/SConscript	2009-02-26 23:35:01.000000000 -0500
@@ -57,8 +57,8 @@ if pluginenv["LUNAR"] == True:
 			pluginenv['LIB_COMPAT'],
 		])
 	pluginenv.Append(CCFLAGS=[
-		'-DZZUB_SHARE_DIR_PATH="\\"%s\\""' % str(pluginenv.Dir("${DESTDIR}${PREFIX}/share/zzub")),
-		'-DZZUB_LIB_DIR_PATH="\\"%s\\""' % str(pluginenv.Dir("${DESTDIR}${PREFIX}${LIBDIR}/zzub")),
+		'-DZZUB_SHARE_DIR_PATH="\\"%s\\""' % str(pluginenv.Dir("${PREFIX}/share/zzub")),
+		'-DZZUB_LIB_DIR_PATH="\\"%s\\""' % str(pluginenv.Dir("${PREFIX}${LIBDIR}/zzub")),
 		'-DSHLIBSUFFIX="\\"%s\\""' % pluginenv['SHLIBSUFFIX'],
 		'-DUSE_LUNAR',
 	])
diff -rupN armstrong.old/src/plugins/zzub_stream/SConscript armstrong/src/plugins/zzub_stream/SConscript
--- armstrong.old/src/plugins/zzub_stream/SConscript	2009-02-25 00:50:05.000000000 -0500
+++ armstrong/src/plugins/zzub_stream/SConscript	2009-02-26 23:33:28.000000000 -0500
@@ -22,8 +22,8 @@ Import('pluginenv', 'build_plugin', 'win
 
 if pluginenv['ZZUB_STREAM']:
 	# make sure libmad.lib is in 
-	pluginenv.Append(LIBS = [ "libmad_static", "sndfile" ] );
-	pluginenv.Append(CPPPATH = [ "../../libmad", "resampler" ] );
+	pluginenv.Append(LIBS = [ "sndfile" ] );
+	pluginenv.Append(CPPPATH = [ "${PREFIX}/include", "resampler" ] );
 
 	build_plugin(pluginenv, 'zzub_stream', files=[
 			'main.cpp',