mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-10 06:37:06 +01:00
Update portsmf to SVN r227.
This commit is contained in:
@@ -169,14 +169,6 @@ Upstream Versions:
|
||||
mod-script-pipe
|
||||
---------------
|
||||
|
||||
portaudio
|
||||
---------
|
||||
http://portaudio.com/
|
||||
cross-platform audio I/O library version 18, used for 1.2.x version of
|
||||
Audacity.
|
||||
Quite heavily patched local copy to get AC-97 ALSA cards to play back
|
||||
correctly.
|
||||
|
||||
portaudio-v19
|
||||
-------------
|
||||
http://portaudio.com/
|
||||
@@ -205,20 +197,9 @@ portsmf
|
||||
-------
|
||||
http://portmedia.sourceforge.net/
|
||||
Cross-platform Midi file reader and writer (succeeded and obsoltes allegro)
|
||||
Version in Audacity SVN: SVN snapshot from ????
|
||||
Patches:
|
||||
portsmf-includes.patch add include of <cstring> needed to compile with recent
|
||||
GCC versions
|
||||
portsmf-string-const.patch Add string const qualifiers as needed
|
||||
local-macros.patch Add all the necessary 3rd party m4 macros into autotools
|
||||
/m4/ and supporting changes.
|
||||
unsigned-const-casts.patch Build fix for Solaris compiler, adds casts to
|
||||
unsigned integer literals.
|
||||
AM_MAINTAINER_MODE has been added to configure.ac to disable autotools rebuilds
|
||||
by default
|
||||
All patches have been added to upstream patch tracker at
|
||||
https://sourceforge.net/tracker2/?group_id=196750&atid=958711
|
||||
|
||||
Version in Audacity SVN: SVN snapshot from 227
|
||||
Patches: none
|
||||
Upstream Version: SVN revision 227
|
||||
|
||||
portburn
|
||||
--------
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
# Makefile(.in) for portSMF using Autotools (but not libtool).
|
||||
# Written by Richard Ash following Gary Vaughan's Autobook
|
||||
|
||||
# tell aclocal that extra macros can be found in autotools/m4/
|
||||
ACLOCAL_AMFLAGS = -I autotools/m4
|
||||
|
||||
# define the output library (link with -lportSMF)
|
||||
lib_LIBRARIES = libportSMF.a
|
||||
|
||||
# define the source files to use
|
||||
libportSMF_a_SOURCES = allegro.cpp \
|
||||
allegrosmfwr.cpp \
|
||||
allegrord.cpp \
|
||||
allegrowr.cpp \
|
||||
allegrosmfrd.cpp \
|
||||
mfmidi.cpp \
|
||||
strparse.cpp \
|
||||
algrd_internal.h \
|
||||
algsmfrd_internal.h
|
||||
|
||||
# and the header files for the library. At the moment these go into the include
|
||||
# directory directly, it would be much better to have them in a subdirectory
|
||||
# but that would mean re-organising them here (a subdirectory called portSMF to
|
||||
# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths
|
||||
# to the headers here and change the name of the variable to nobase_include_...
|
||||
include_HEADERS = allegro.h \
|
||||
mfmidi.h \
|
||||
strparse.h \
|
||||
trace.h
|
||||
|
||||
# files that only really viscous cleans remove
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# other distributed files in case users don't have a complete set of auto*
|
||||
AUX_DIST = $(ac_aux_dir)/config.guess \
|
||||
$(ac_aux_dir)/config.sub \
|
||||
$(ac_aux_dir)/install-sh \
|
||||
$(ac_aux_dir)/mdate-sh \
|
||||
$(ac_aux_dir)/missing \
|
||||
$(ac_aux_dir)/mkinstalldirs \
|
||||
$(MAINTAINERCLEANFILES)
|
||||
|
||||
# Documentation files that should be both distributed and installed in the doc
|
||||
# directory,
|
||||
dist_doc_DATA = README.txt license.txt
|
||||
## Process this file with automake to produce Makefile.in
|
||||
# Makefile(.in) for portSMF using Autotools (but not libtool).
|
||||
# Written by Richard Ash following Gary Vaughan's Autobook
|
||||
|
||||
# tell aclocal that extra macros can be found in autotools/m4/
|
||||
ACLOCAL_AMFLAGS = -I autotools/m4
|
||||
|
||||
# define the output library (link with -lportSMF)
|
||||
lib_LIBRARIES = libportSMF.a
|
||||
|
||||
# define the source files to use
|
||||
libportSMF_a_SOURCES = allegro.cpp \
|
||||
allegrosmfwr.cpp \
|
||||
allegrord.cpp \
|
||||
allegrowr.cpp \
|
||||
allegrosmfrd.cpp \
|
||||
mfmidi.cpp \
|
||||
strparse.cpp \
|
||||
algrd_internal.h \
|
||||
algsmfrd_internal.h
|
||||
|
||||
# and the header files for the library. At the moment these go into the include
|
||||
# directory directly, it would be much better to have them in a subdirectory
|
||||
# but that would mean re-organising them here (a subdirectory called portSMF to
|
||||
# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths
|
||||
# to the headers here and change the name of the variable to nobase_include_...
|
||||
include_HEADERS = allegro.h \
|
||||
mfmidi.h \
|
||||
strparse.h \
|
||||
trace.h
|
||||
|
||||
# files that only really viscous cleans remove
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# other distributed files in case users don't have a complete set of auto*
|
||||
AUX_DIST = $(ac_aux_dir)/config.guess \
|
||||
$(ac_aux_dir)/config.sub \
|
||||
$(ac_aux_dir)/install-sh \
|
||||
$(ac_aux_dir)/mdate-sh \
|
||||
$(ac_aux_dir)/missing \
|
||||
$(ac_aux_dir)/mkinstalldirs \
|
||||
$(MAINTAINERCLEANFILES)
|
||||
|
||||
# Documentation files that should be both distributed and installed in the doc
|
||||
# directory,
|
||||
dist_doc_DATA = README.txt license.txt
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -144,7 +144,8 @@ Alg_parameter::~Alg_parameter()
|
||||
}
|
||||
|
||||
|
||||
void Alg_parameters::insert_real(Alg_parameters **list, char *name, double r)
|
||||
void Alg_parameters::insert_real(Alg_parameters **list, const char *name,
|
||||
double r)
|
||||
{
|
||||
Alg_parameters_ptr a = new Alg_parameters(*list);
|
||||
*list = a;
|
||||
@@ -154,7 +155,8 @@ void Alg_parameters::insert_real(Alg_parameters **list, char *name, double r)
|
||||
}
|
||||
|
||||
|
||||
void Alg_parameters::insert_string(Alg_parameters **list, char *name, char *s)
|
||||
void Alg_parameters::insert_string(Alg_parameters **list, const char *name,
|
||||
const char *s)
|
||||
{
|
||||
Alg_parameters_ptr a = new Alg_parameters(*list);
|
||||
*list = a;
|
||||
@@ -165,7 +167,8 @@ void Alg_parameters::insert_string(Alg_parameters **list, char *name, char *s)
|
||||
}
|
||||
|
||||
|
||||
void Alg_parameters::insert_integer(Alg_parameters **list, char *name, long i)
|
||||
void Alg_parameters::insert_integer(Alg_parameters **list, const char *name,
|
||||
long i)
|
||||
{
|
||||
Alg_parameters_ptr a = new Alg_parameters(*list);
|
||||
*list = a;
|
||||
@@ -175,7 +178,8 @@ void Alg_parameters::insert_integer(Alg_parameters **list, char *name, long i)
|
||||
}
|
||||
|
||||
|
||||
void Alg_parameters::insert_logical(Alg_parameters **list, char *name, bool l)
|
||||
void Alg_parameters::insert_logical(Alg_parameters **list, const char *name,
|
||||
bool l)
|
||||
{
|
||||
Alg_parameters_ptr a = new Alg_parameters(*list);
|
||||
*list = a;
|
||||
@@ -185,7 +189,8 @@ void Alg_parameters::insert_logical(Alg_parameters **list, char *name, bool l)
|
||||
}
|
||||
|
||||
|
||||
void Alg_parameters::insert_atom(Alg_parameters **list, char *name, char *s)
|
||||
void Alg_parameters::insert_atom(Alg_parameters **list, const char *name,
|
||||
const char *s)
|
||||
{
|
||||
Alg_parameters_ptr a = new Alg_parameters(*list);
|
||||
*list = a;
|
||||
@@ -195,7 +200,8 @@ void Alg_parameters::insert_atom(Alg_parameters **list, char *name, char *s)
|
||||
}
|
||||
|
||||
|
||||
Alg_parameters *Alg_parameters::remove_key(Alg_parameters **list, char *name)
|
||||
Alg_parameters *Alg_parameters::remove_key(Alg_parameters **list,
|
||||
const char *name)
|
||||
{
|
||||
while (*list) {
|
||||
if (STREQL((*list)->parm.attr_name(), name)) {
|
||||
@@ -210,12 +216,12 @@ Alg_parameters *Alg_parameters::remove_key(Alg_parameters **list, char *name)
|
||||
}
|
||||
|
||||
|
||||
Alg_parameter_ptr Alg_parameters::find(Alg_attribute *attr)
|
||||
Alg_parameter_ptr Alg_parameters::find(Alg_attribute attr)
|
||||
{
|
||||
assert(attr);
|
||||
Alg_parameters_ptr temp = this;
|
||||
while (temp) {
|
||||
if (temp->parm.attr == *attr) {
|
||||
if (temp->parm.attr == attr) {
|
||||
return &(temp->parm);
|
||||
}
|
||||
}
|
||||
@@ -259,7 +265,7 @@ void Alg_event::set_parameter(Alg_parameter_ptr new_parameter)
|
||||
Alg_parameter_ptr parm;
|
||||
if (is_note()) {
|
||||
Alg_note_ptr note = (Alg_note_ptr) this;
|
||||
parm = note->parameters->find(&(new_parameter->attr));
|
||||
parm = note->parameters->find(new_parameter->attr);
|
||||
if (!parm) {
|
||||
note->parameters = new Alg_parameters(note->parameters);
|
||||
parm = &(note->parameters->parm);
|
||||
@@ -272,7 +278,7 @@ void Alg_event::set_parameter(Alg_parameter_ptr new_parameter)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::set_string_value(char *a, char *value)
|
||||
void Alg_event::set_string_value(const char *a, const char *value)
|
||||
{
|
||||
assert(a); // must be non-null
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
@@ -285,7 +291,7 @@ void Alg_event::set_string_value(char *a, char *value)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::set_real_value(char *a, double value)
|
||||
void Alg_event::set_real_value(const char *a, double value)
|
||||
{
|
||||
assert(a); // must be non-null
|
||||
// attr is like a, but it has the type code prefixed for
|
||||
@@ -301,7 +307,7 @@ void Alg_event::set_real_value(char *a, double value)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::set_logical_value(char *a, bool value)
|
||||
void Alg_event::set_logical_value(const char *a, bool value)
|
||||
{
|
||||
assert(a); // must be non-null
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
@@ -314,7 +320,7 @@ void Alg_event::set_logical_value(char *a, bool value)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::set_integer_value(char *a, long value)
|
||||
void Alg_event::set_integer_value(const char *a, long value)
|
||||
{
|
||||
assert(a); // must be non-null
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
@@ -327,7 +333,7 @@ void Alg_event::set_integer_value(char *a, long value)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::set_atom_value(char *a, char *value)
|
||||
void Alg_event::set_atom_value(const char *a, const char *value)
|
||||
{
|
||||
assert(a); // must be non-null
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
@@ -403,18 +409,18 @@ void Alg_event::set_duration(double d)
|
||||
}
|
||||
|
||||
|
||||
bool Alg_event::has_attribute(char *a)
|
||||
bool Alg_event::has_attribute(const char *a)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a); // must be non-null
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
return parm != NULL;
|
||||
}
|
||||
|
||||
|
||||
char Alg_event::get_attribute_type(char *a)
|
||||
char Alg_event::get_attribute_type(const char *a)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a);
|
||||
@@ -422,66 +428,66 @@ char Alg_event::get_attribute_type(char *a)
|
||||
}
|
||||
|
||||
|
||||
const char *Alg_event::get_string_value(char *a, char *value)
|
||||
const char *Alg_event::get_string_value(const char *a, const char *value)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a); // must be non-null
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
assert(a[0] == 's'); // must be of type string
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
if (parm) return parm->s;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
double Alg_event::get_real_value(char *a, double value)
|
||||
double Alg_event::get_real_value(const char *a, double value)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a);
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
assert(a[0] == 'r'); // must be of type real
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
if (parm) return parm->r;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
bool Alg_event::get_logical_value(char *a, bool value)
|
||||
bool Alg_event::get_logical_value(const char *a, bool value)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a);
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
assert(a[0] == 'l'); // must be of type logical
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
if (parm) return parm->l;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
long Alg_event::get_integer_value(char *a, long value)
|
||||
long Alg_event::get_integer_value(const char *a, long value)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a);
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
assert(a[0] == 'i'); // must be of type integer
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
if (parm) return parm->i;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
const char *Alg_event::get_atom_value(char *a, char *value)
|
||||
const char *Alg_event::get_atom_value(const char *a, const char *value)
|
||||
{
|
||||
assert(is_note());
|
||||
assert(a);
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
Alg_attribute attr = symbol_table.insert_string(a);
|
||||
assert(a[0] == 'a'); // must be of type atom
|
||||
Alg_parameter_ptr parm = note->parameters->find(&attr);
|
||||
Alg_parameter_ptr parm = note->parameters->find(attr);
|
||||
if (parm) return parm->a;
|
||||
// if default is a string, convert to an atom (unique
|
||||
// string in symbol table) and return it
|
||||
@@ -490,7 +496,7 @@ const char *Alg_event::get_atom_value(char *a, char *value)
|
||||
}
|
||||
|
||||
|
||||
void Alg_event::delete_attribute(char *a)
|
||||
void Alg_event::delete_attribute(const char *a)
|
||||
{
|
||||
assert(is_note());
|
||||
Alg_note* note = (Alg_note *) this;
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
// Just as serialization uses ser_buf for output, unserialization uses
|
||||
// unser_buf for reading. unser_buf is another static member of Alg_track.
|
||||
|
||||
#ifndef __ALLEGRO__
|
||||
#define __ALLEGRO__
|
||||
#ifndef ALLEGRO_H
|
||||
#define ALLEGRO_H
|
||||
#include <assert.h>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
@@ -158,15 +158,17 @@ public:
|
||||
// attribute. If you have already done the symbol table lookup/insert
|
||||
// you can do these operations faster (in which case we should add
|
||||
// another set of functions that take attributes as arguments.)
|
||||
static void insert_real(Alg_parameters **list, char *name, double r);
|
||||
static void insert_real(Alg_parameters **list, const char *name, double r);
|
||||
// insert string will copy string to heap
|
||||
static void insert_string(Alg_parameters **list, char *name, char *s);
|
||||
static void insert_integer(Alg_parameters **list, char *name, long i);
|
||||
static void insert_logical(Alg_parameters **list, char *name, bool l);
|
||||
static void insert_atom(Alg_parameters **list, char *name, char *s);
|
||||
static Alg_parameters *remove_key(Alg_parameters **list, char *name);
|
||||
static void insert_string(Alg_parameters **list, const char *name,
|
||||
const char *s);
|
||||
static void insert_integer(Alg_parameters **list, const char *name, long i);
|
||||
static void insert_logical(Alg_parameters **list, const char *name, bool l);
|
||||
static void insert_atom(Alg_parameters **list, const char *name,
|
||||
const char *s);
|
||||
static Alg_parameters *remove_key(Alg_parameters **list, const char *name);
|
||||
// find an attribute/value pair
|
||||
Alg_parameter_ptr find(Alg_attribute *attr);
|
||||
Alg_parameter_ptr find(Alg_attribute attr);
|
||||
} *Alg_parameters_ptr;
|
||||
|
||||
|
||||
@@ -217,11 +219,11 @@ public:
|
||||
// attribute (first argument) must agree in type with the second arg.
|
||||
// The last letter of the attribute implies the type (see below).
|
||||
void set_parameter(Alg_parameter_ptr new_parameter);
|
||||
void set_string_value(char *attr, char *value);
|
||||
void set_real_value(char *attr, double value);
|
||||
void set_logical_value(char *attr, bool value);
|
||||
void set_integer_value(char *attr, long value);
|
||||
void set_atom_value(char *attr, char *atom);
|
||||
void set_string_value(const char *attr, const char *value);
|
||||
void set_real_value(const char *attr, double value);
|
||||
void set_logical_value(const char *attr, bool value);
|
||||
void set_integer_value(const char *attr, long value);
|
||||
void set_atom_value(const char *attr, const char *atom);
|
||||
|
||||
// Some note methods. These fail (via assert()) if this is not a note:
|
||||
//
|
||||
@@ -241,17 +243,22 @@ public:
|
||||
// types. Attribute names end with a type designation: 's', 'r', 'l',
|
||||
// 'i', or 'a'.
|
||||
//
|
||||
bool has_attribute(char *attr); // test if note has attribute/value pair
|
||||
char get_attribute_type(char *attr); // get the associated type:
|
||||
bool has_attribute(const char *attr); // test if note has attribute/value pair
|
||||
char get_attribute_type(const char *attr); // get the associated type:
|
||||
// 's' = string,
|
||||
// 'r' = real (double), 'l' = logical (bool), 'i' = integer (long),
|
||||
// 'a' = atom (char *), a unique string stored in Alg_seq
|
||||
const char *get_string_value(char *attr, char *value = NULL); // get the string value
|
||||
double get_real_value(char *attr, double value = 0.0); // get the real value
|
||||
bool get_logical_value(char *attr, bool value = false); // get the logical value
|
||||
long get_integer_value(char *attr, long value = 0); // get the integer value
|
||||
const char *get_atom_value(char *attr, char *value = NULL); // get the atom value
|
||||
void delete_attribute(char *attr); // delete an attribute/value pair
|
||||
// get the string value
|
||||
const char *get_string_value(const char *attr, const char *value = NULL);
|
||||
// get the real value
|
||||
double get_real_value(const char *attr, double value = 0.0);
|
||||
// get the logical value
|
||||
bool get_logical_value(const char *attr, bool value = false);
|
||||
// get the integer value
|
||||
long get_integer_value(const char *attr, long value = 0);
|
||||
// get the atom value
|
||||
const char *get_atom_value(const char *attr, const char *value = NULL);
|
||||
void delete_attribute(const char *attr); // delete an attribute/value pair
|
||||
// (ignore if no matching attribute/value pair exists)
|
||||
|
||||
// Some attribute/value methods. These fail if this is not an update.
|
||||
|
||||
137
lib-src/portsmf/apps/allegroconvert.cpp
Executable file
137
lib-src/portsmf/apps/allegroconvert.cpp
Executable file
@@ -0,0 +1,137 @@
|
||||
/* allegroconvert.cpp -- convert from allegro to standard midi files */
|
||||
|
||||
/* CHANGE LOG
|
||||
04 apr 03 -- added options to remove tempo track, retaining either
|
||||
the original beats or original timing (RBD)
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
#include "allegro.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
void midi_fail(char *msg)
|
||||
{
|
||||
printf("Failure: %s\n", msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
void *midi_alloc(size_t s) { return malloc(s); }
|
||||
void midi_free(void *a) { free(a); }
|
||||
|
||||
|
||||
void print_help()
|
||||
{
|
||||
printf("%s%s%s%s%s%s%s%s",
|
||||
"Usage: allegroconvert [-m] [-a] [-t tempo] [-f] <filename>\n",
|
||||
" Use -m for midifile->allegro, -a for allegro->midifile.\n",
|
||||
" .mid extension implies -m, .gro implies -a\n",
|
||||
" If tempo (a float) is specified after -t, the tempo track\n",
|
||||
" is deleted and replaced by a fixed tempo.\n",
|
||||
" If -f (flatten) is specified, output a flat tempo=60,\n",
|
||||
" preserving the original timing of all midi events.\n",
|
||||
" Do not use both -t and -f.\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
// process -- perform tempo changing and flattening operations
|
||||
//
|
||||
void process(Alg_seq_ptr seq, bool tempo_flag, double tempo,
|
||||
bool flatten_flag)
|
||||
{
|
||||
// the tempo changing operation replaces the tempo track with
|
||||
// a fixed tempo. This changes the timing of the result.
|
||||
if (tempo_flag) {
|
||||
seq->convert_to_beats(); // preserve beats
|
||||
} else if (flatten_flag) {
|
||||
seq->convert_to_seconds(); // preserve timing
|
||||
} else return;
|
||||
// the following finishes both tempo and flatten processing...
|
||||
seq->get_time_map()->beats.len = 1; // remove contents of tempo map
|
||||
seq->get_time_map()->last_tempo = tempo / 60.0; // set the new fixed tempo
|
||||
// (allegro uses beats/second so divide bpm by 60)
|
||||
seq->get_time_map()->last_tempo_flag = true;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
print_help();
|
||||
}
|
||||
char *filename = argv[argc - 1];
|
||||
char outfilename[256];
|
||||
bool midifile = false;
|
||||
bool allegrofile = false;
|
||||
bool flatten_flag = false;
|
||||
double tempo = 60.0; // default is used for -f (flatten)
|
||||
bool tempo_flag = false;
|
||||
char *ext = NULL;
|
||||
|
||||
int i = 1;
|
||||
while (i < argc - 1) {
|
||||
if (argv[i][0] != '-') print_help();
|
||||
if (argv[i][1] == 'm') midifile = true;
|
||||
else if (argv[i][1] == 'a') allegrofile = true;
|
||||
else if (argv[i][1] == 't') {
|
||||
i++;
|
||||
if (i >= argc - 1) print_help(); // expected tempo
|
||||
tempo = atof(argv[i]);
|
||||
tempo_flag = true;
|
||||
} else if (argv[i][1] == 'f') {
|
||||
flatten_flag = true;
|
||||
} else print_help();
|
||||
i++;
|
||||
}
|
||||
// Do not use both -t and -f:
|
||||
if (tempo_flag & flatten_flag) print_help();
|
||||
|
||||
int len = strlen(filename);
|
||||
if (!midifile && !allegrofile) {
|
||||
if (len < 4) print_help(); // no extension, need -m or -a
|
||||
ext = filename + len - 4;
|
||||
if (strcmp(ext, ".mid") == 0) midifile = true;
|
||||
else if (strcmp(ext, ".gro") == 0) allegrofile = true;
|
||||
else print_help();
|
||||
} else if (len > 4) {
|
||||
ext = filename + len - 4;
|
||||
}
|
||||
Alg_seq_ptr seq;
|
||||
strcpy(outfilename, filename);
|
||||
if (midifile) {
|
||||
seq = new Alg_seq(filename, true);
|
||||
process(seq, tempo_flag, tempo, flatten_flag);
|
||||
if (ext && strcmp(ext, ".mid") == 0) {
|
||||
ext = outfilename + strlen(outfilename) - 4;
|
||||
} else {
|
||||
ext = outfilename + strlen(outfilename);
|
||||
}
|
||||
strcpy(ext, ".gro");
|
||||
seq->write(outfilename);
|
||||
} else if (allegrofile) {
|
||||
seq = new Alg_seq(filename, false);
|
||||
process(seq, tempo_flag, tempo, flatten_flag);
|
||||
if (ext && strcmp(ext, ".gro") == 0) {
|
||||
ext = outfilename + strlen(outfilename) - 4;
|
||||
} else {
|
||||
ext = outfilename + strlen(outfilename);
|
||||
}
|
||||
strcpy(ext, ".mid");
|
||||
seq->smf_write(outfilename);
|
||||
}
|
||||
|
||||
int events = 0;
|
||||
for (i = 0; i < seq->track_list.length(); i++) {
|
||||
events += seq->track_list[i].length();
|
||||
}
|
||||
printf("%ld tracks, %d events\n", seq->track_list.length(), events);
|
||||
printf("wrote %s\n", outfilename);
|
||||
|
||||
/* DELETE THE DATA */
|
||||
delete seq;
|
||||
|
||||
return 0;
|
||||
}
|
||||
197
lib-src/portsmf/apps/allegroconvert.vcproj
Normal file
197
lib-src/portsmf/apps/allegroconvert.vcproj
Normal file
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="allegroconvert"
|
||||
ProjectGUID="{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}"
|
||||
RootNamespace="allegroconvert"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../Debug/portsmf.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../Release/portsmf.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\allegroconvert.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
89
lib-src/portsmf/apps/allegroplay.cpp
Executable file
89
lib-src/portsmf/apps/allegroplay.cpp
Executable file
@@ -0,0 +1,89 @@
|
||||
|
||||
//#include "stdlib.h"
|
||||
//#include "stdio.h"
|
||||
//#include "memory.h"
|
||||
//#include "assert.h"
|
||||
#include <fstream>
|
||||
#include "allegro.h"
|
||||
#include "mfmidi.h"
|
||||
#include "portmidi.h"
|
||||
#include "seq2midi.h"
|
||||
//#include "string.h"
|
||||
//#include "strparse.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "crtdbg.h" // for memory allocation debugging
|
||||
#endif
|
||||
|
||||
void midi_fail(char *msg)
|
||||
{
|
||||
printf("Failure: %s\n", msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
void *midi_alloc(size_t s) { return malloc(s); }
|
||||
void midi_free(void *a) { free(a); }
|
||||
|
||||
|
||||
void print_help()
|
||||
{
|
||||
printf("Usage: allegroplay [-m] [-a] <filename> [-n]\n");
|
||||
printf(" use -m for midifile, -a for allegro file.\n");
|
||||
printf(" .mid extension implies -m, .gro implies -a\n");
|
||||
printf(" use -n for non-interactive use (no prompts)\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
print_help();
|
||||
}
|
||||
char *filename = NULL;
|
||||
bool midifile = false;
|
||||
bool allegrofile = false;
|
||||
bool interactive = true;
|
||||
int i = 1; // scan the command line
|
||||
while (i < argc) {
|
||||
if (argv[i][0] == '-') {
|
||||
if (argv[1][1] == 'm') midifile = true;
|
||||
else if (argv[i][1] == 'a') allegrofile = true;
|
||||
else if (argv[i][1] == 'n') interactive = false;
|
||||
} else {
|
||||
filename = argv[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (!filename) {
|
||||
print_help();
|
||||
}
|
||||
|
||||
if (!midifile && !allegrofile) {
|
||||
int len = strlen(filename);
|
||||
if (len < 4) print_help(); // no extension, need -m or -a
|
||||
char *ext = filename + len - 4;
|
||||
if (strcmp(ext, ".mid") == 0) midifile = true;
|
||||
else if (strcmp(ext, ".gro") == 0) allegrofile = true;
|
||||
else print_help();
|
||||
}
|
||||
Alg_seq seq(filename, midifile);
|
||||
|
||||
int events = 0;
|
||||
for (i = 0; i < seq.tracks(); i++) {
|
||||
events += seq.track(i)->length();
|
||||
}
|
||||
if (interactive) {
|
||||
printf("%d tracks, %d events\n", seq.tracks(), events);
|
||||
}
|
||||
/* PLAY THE FILE VIA MIDI: */
|
||||
if (interactive) {
|
||||
printf("type return to play midi file: ");
|
||||
char input[80];
|
||||
fgets(input, 80, stdin);
|
||||
}
|
||||
seq_play(seq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
62
lib-src/portsmf/apps/midicode.h
Executable file
62
lib-src/portsmf/apps/midicode.h
Executable file
@@ -0,0 +1,62 @@
|
||||
/************************************************************************
|
||||
*
|
||||
* Midi codes
|
||||
* Copyright 1989 Carnegie Mellon University
|
||||
*
|
||||
*************************************************************************
|
||||
* Change Log
|
||||
* Date | Change
|
||||
*-----------+------------------------------------------------------------
|
||||
* 11-Mar-94 | PLu : Port to IRI
|
||||
************************************************************************/
|
||||
|
||||
#define MIDI_DATA(d) (0x7f & (d))
|
||||
#define MIDI_CHANNEL(c) (0x0f & ((c) - 1))
|
||||
#define MIDI_PORT(c) (((c) - 1) >> 4)
|
||||
#define MIDI_PROGRAM(p) MIDI_DATA((p) - 1)
|
||||
|
||||
#define MIDI_STATUS_BIT 0x80
|
||||
#define MIDI_COMMON 0x70
|
||||
#define MIDI_CODE_MASK 0xf0
|
||||
#define MIDI_CHN_MASK 0x0f
|
||||
#define MIDI_REALTIME 0xf8
|
||||
#define MIDI_CHAN_MODE 0xfa
|
||||
|
||||
#define MIDI_OFF_NOTE 0x80
|
||||
#define MIDI_ON_NOTE 0x90
|
||||
#define MIDI_POLY_TOUCH 0xa0
|
||||
#define MIDI_CTRL 0xb0
|
||||
#define MIDI_CH_PROGRAM 0xc0
|
||||
#define MIDI_TOUCH 0xd0
|
||||
#define MIDI_BEND 0xe0
|
||||
|
||||
#ifdef UNIX_IRIX_MIDIFNS
|
||||
#define CMT_MIDI_SYSEX 0xf0
|
||||
#define CMT_MIDI_EOX 0xf7
|
||||
#else
|
||||
#define MIDI_SYSEX 0xf0
|
||||
#define MIDI_EOX 0xf7
|
||||
#endif
|
||||
#define MIDI_Q_FRAME 0xf1
|
||||
#define MIDI_SONG_POINTER 0xf2
|
||||
#define MIDI_SONG_SELECT 0xf3
|
||||
#define MIDI_F4 0xf4
|
||||
#define MIDI_F5 0xf5
|
||||
#define MIDI_TUNE_REQ 0xf6
|
||||
#define MIDI_TIME_CLOCK 0xf8
|
||||
#define MIDI_F9 0xf9
|
||||
#define MIDI_START 0xfa
|
||||
#define MIDI_CONTINUE 0xfb
|
||||
#define MIDI_STOP 0xfc
|
||||
#define MIDI_FD 0xfd
|
||||
#define MIDI_ACTIVE_SENSING 0xfe
|
||||
#define MIDI_SYS_RESET 0xff
|
||||
|
||||
#define MIDI_LOCAL 0x7a
|
||||
#define MIDI_LOCAL_OFF 0x00
|
||||
#define MIDI_LOCAL_ON 0x7f
|
||||
#define MIDI_ALL_OFF 0x7b
|
||||
#define MIDI_OMNI_OFF 0x7c
|
||||
#define MIDI_OMNI_ON 0x7d
|
||||
#define MIDI_MONO_ON 0x7e
|
||||
#define MIDI_POLY_ON 0x7f
|
||||
166
lib-src/portsmf/apps/seq2midi.cpp
Normal file
166
lib-src/portsmf/apps/seq2midi.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
// seq2midi.cpp -- simple sequence player, intended to help test/demo
|
||||
// the allegro code
|
||||
|
||||
#include <fstream>
|
||||
#include "allegro.h"
|
||||
#include "porttime.h"
|
||||
#include "portmidi.h"
|
||||
#include "midicode.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define ROUND(x) (int) ((x)+0.5)
|
||||
|
||||
|
||||
double time_elapsed()
|
||||
{
|
||||
return Pt_Time() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
void wait_until(double time)
|
||||
{
|
||||
// print "." to stdout while waiting
|
||||
static double last_time = 0.0;
|
||||
double now = time_elapsed();
|
||||
if (now < last_time) last_time = now;
|
||||
while (now < time) {
|
||||
Pt_Sleep(1);
|
||||
now = time_elapsed();
|
||||
long now_sec = (long) now;
|
||||
long last_sec = (long) last_time;
|
||||
if (now_sec > last_sec) {
|
||||
fprintf(stdout, ".");
|
||||
fflush(stdout);
|
||||
last_time = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define never 1000000 // represents infinite time
|
||||
|
||||
void midi_note_on(PortMidiStream *midi, double when, int chan, int key, int loud)
|
||||
{
|
||||
unsigned long timestamp = (unsigned long) (when * 1000);
|
||||
chan = chan & 15;
|
||||
if (key > 127) key = 127;
|
||||
if (key < 0) key = 0;
|
||||
if (loud > 127) loud = 127;
|
||||
if (loud < 0) loud = 0;
|
||||
unsigned long data = Pm_Message(0x90 + chan, key, loud);
|
||||
Pm_WriteShort(midi, timestamp, data);
|
||||
}
|
||||
|
||||
|
||||
static void midi_channel_message_2(PortMidiStream *midi, double when,
|
||||
int status, int chan, int data)
|
||||
{
|
||||
unsigned long timestamp = (unsigned long) (when * 1000);
|
||||
chan = chan & 15;
|
||||
if (data > 127) data = 127;
|
||||
if (data < 0) data = 0;
|
||||
unsigned long msg = Pm_Message(status + chan, data, 0);
|
||||
Pm_WriteShort(midi, timestamp, msg);
|
||||
}
|
||||
|
||||
|
||||
static void midi_channel_message(PortMidiStream *midi, double when,
|
||||
int status, int chan, int data, int data2)
|
||||
{
|
||||
unsigned long timestamp = (unsigned long) (when * 1000);
|
||||
chan = chan & 15;
|
||||
if (data > 127) data = 127;
|
||||
if (data < 0) data = 0;
|
||||
if (data2 > 127) data2 = 127;
|
||||
if (data2 < 0) data2 = 0;
|
||||
unsigned long msg = Pm_Message(status + chan, data, data2);
|
||||
Pm_WriteShort(midi, timestamp, msg);
|
||||
}
|
||||
|
||||
|
||||
static const char *pressure_attr;
|
||||
static const char *bend_attr;
|
||||
static const char *program_attr;
|
||||
|
||||
|
||||
void send_midi_update(Alg_update_ptr u, PortMidiStream *midi)
|
||||
{
|
||||
if (u->get_attribute() == pressure_attr) {
|
||||
if (u->get_identifier() < 0) {
|
||||
midi_channel_message_2(midi, u->time, MIDI_TOUCH, u->chan,
|
||||
(int) (u->get_real_value() * 127));
|
||||
} else {
|
||||
midi_channel_message(midi, u->time, MIDI_POLY_TOUCH, u->chan,
|
||||
u->get_identifier(),
|
||||
(int) (u->get_real_value() * 127));
|
||||
}
|
||||
} else if (u->get_attribute() == bend_attr) {
|
||||
int bend = ROUND((u->get_real_value() + 1) * 8192);
|
||||
if (bend > 8191) bend = 8191;
|
||||
if (bend < 0) bend = 0;
|
||||
midi_channel_message(midi, u->time, MIDI_BEND, u->chan,
|
||||
bend >> 7, bend & 0x7F);
|
||||
} else if (u->get_attribute() == program_attr) {
|
||||
midi_channel_message_2(midi, u->time, MIDI_CH_PROGRAM,
|
||||
u->chan, u->get_integer_value());
|
||||
} else if (strncmp("control", u->get_attribute(), 7) == 0 &&
|
||||
u->get_update_type() == 'r') {
|
||||
int control = atoi(u->get_attribute() + 7);
|
||||
int val = ROUND(u->get_real_value() * 127);
|
||||
midi_channel_message(midi, u->time, MIDI_CTRL, u->chan, control, val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void seq2midi(Alg_seq &seq, PortMidiStream *midi)
|
||||
{
|
||||
// prepare by doing lookup of important symbols
|
||||
pressure_attr = symbol_table.insert_string("pressurer") + 1;
|
||||
bend_attr = symbol_table.insert_string("bendr") + 1;
|
||||
program_attr = symbol_table.insert_string("programi") + 1;
|
||||
|
||||
Alg_iterator iterator(&seq, true);
|
||||
iterator.begin();
|
||||
bool note_on;
|
||||
Alg_event_ptr e = iterator.next(¬e_on);
|
||||
Pt_Start(1, NULL, NULL); // initialize time
|
||||
while (e) {
|
||||
double next_time = (note_on ? e->time : e->get_end_time());
|
||||
wait_until(next_time);
|
||||
if (e->is_note() && note_on) { // process notes here
|
||||
// printf("Note at %g: chan %d key %d loud %d\n",
|
||||
// next_time, e->chan, e->key, (int) e->loud);
|
||||
midi_note_on(midi, next_time, e->chan, e->get_identifier(),
|
||||
(int) e->get_loud());
|
||||
} else if (e->is_note()) { // must be a note off
|
||||
midi_note_on(midi, next_time, e->chan, e->get_identifier(), 0);
|
||||
} else if (e->is_update()) { // process updates here
|
||||
Alg_update_ptr u = (Alg_update_ptr) e; // coerce to proper type
|
||||
send_midi_update(u, midi);
|
||||
}
|
||||
// add next note
|
||||
e = iterator.next(¬e_on);
|
||||
}
|
||||
iterator.end();
|
||||
}
|
||||
|
||||
|
||||
void seq_play(Alg_seq &seq)
|
||||
{
|
||||
PortMidiStream *mo;
|
||||
Pm_Initialize();
|
||||
PmDeviceID dev = Pm_GetDefaultOutputDeviceID();
|
||||
// note that the Pt_Time type cast is required because Pt_Time does
|
||||
// not take an input parameter, whereas for generality, PortMidi
|
||||
// passes in a void * so the time function can get some context.
|
||||
// It is safe to call Pt_Time with a parameter -- it will just be ignored.
|
||||
if (Pm_OpenOutput(&mo, dev, NULL, 256,
|
||||
(PmTimestamp (*)(void *))&Pt_Time, NULL, 100) == pmNoError) {
|
||||
seq2midi(seq, mo);
|
||||
wait_until(time_elapsed() + 1);
|
||||
Pm_Close(mo);
|
||||
}
|
||||
Pm_Terminate();
|
||||
return;
|
||||
}
|
||||
5
lib-src/portsmf/apps/seq2midi.h
Normal file
5
lib-src/portsmf/apps/seq2midi.h
Normal file
@@ -0,0 +1,5 @@
|
||||
// play a sequence to a midi stream
|
||||
void seq2midi(Alg_seq &seq, PortMidiStream *midi);
|
||||
|
||||
// open a stream, play a sequence, close the stream
|
||||
void seq_play(Alg_seq &seq);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,367 +1,367 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
|
||||
10
lib-src/portsmf/changelog.txt
Normal file
10
lib-src/portsmf/changelog.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Change Log for portsmf
|
||||
|
||||
09-Oct-2010 RBD Many more changes to fix bugs, support Audacity, and general
|
||||
cleanup.
|
||||
|
||||
03-Jul-2008 RBD Extensive modifications: most c-strings are now c++ strings to
|
||||
avoid buffer overrun problems. I/O changed to use c++ streams.
|
||||
Alg_seq input is now done with constructors. Output is now
|
||||
done by member function. Many bugs have been fixed.
|
||||
|
||||
4555
lib-src/portsmf/configure
vendored
4555
lib-src/portsmf/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,136 +1,136 @@
|
||||
dnl
|
||||
dnl portSMF configure.in script - version not using libtool
|
||||
dnl
|
||||
dnl Joshua Haberman
|
||||
dnl Dominic Mazzoni
|
||||
dnl Richard Ash
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Instructions: to create "configure" from "configure.in", run:
|
||||
dnl aclocal
|
||||
dnl autoconf
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Require autoconf >= 2.61
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl Init autoconf and automake
|
||||
AC_INIT([portSMF],[0.1])
|
||||
dnl check that we have some source code
|
||||
AC_CONFIG_SRCDIR([allegro.h])
|
||||
dnl keep autools files in a subdirectory
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
# which also contains a subdir containing macros
|
||||
AC_CONFIG_MACRO_DIR([autotools/m4])
|
||||
dnl set up automake
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
dnl Audacity policy: don't enable automatic rebuild of configure et al if
|
||||
dnl sources change
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------
|
||||
dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2"
|
||||
dnl if $CFLAGS is blank and it finds GCC
|
||||
cflags_save="$CFLAGS"
|
||||
cppflags_save="$CPPFLAGS"
|
||||
cxxflags_save="$CXXFLAGS"
|
||||
AC_PROG_CC
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
dnl we will need an "install" program to be available
|
||||
AC_PROG_INSTALL
|
||||
dnl and ranlib for static libraries
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Make the install prefix available to the program so that the pkg-config file
|
||||
dnl can be created correctly
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
if [[ $prefix = "NONE" ]] ; then
|
||||
AC_DEFINE(INSTALL_PREFIX, "/usr/local",
|
||||
[define as prefix where Audacity is installed])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix")
|
||||
fi
|
||||
|
||||
dnl Build Options
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[enable debug support [default=no]])],
|
||||
debug_preference="$enableval",
|
||||
debug_preference="no")
|
||||
|
||||
dnl ----------------------------------------------------
|
||||
dnl If user asked for debug, put debug in compiler flags
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
dnl we want debuging on
|
||||
AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -g "
|
||||
CXXFLAGS="${CXXFLAGS} -g "
|
||||
fi
|
||||
|
||||
dnl --------------------------------------------------------------------------
|
||||
dnl We would like warnings enabled on the builds, but different compilers need
|
||||
dnl different options for these. This bit tries to work out what flags we
|
||||
dnl should add to the compiler we are using.
|
||||
dnl --------------------------------------------------------------------------
|
||||
|
||||
dnl Strict prototypes flags for C (only C because doesn't work for C++)
|
||||
AX_CFLAGS_STRICT_PROTOTYPES(CFLAGS)
|
||||
|
||||
dnl Sensible warnings for C
|
||||
AX_CFLAGS_WARN_ALL(wall_flags)
|
||||
CFLAGS="${CFLAGS} $wall_flags"
|
||||
dnl try and use it on C++ as well
|
||||
AX_CXX_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cxx_does_wall="yes", cxx_does_wall="no")
|
||||
if test "x$cxx_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ compiler
|
||||
CXXFLAGS="${CXXFLAGS} $wall_flags"
|
||||
fi
|
||||
AX_CXXCPP_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cpp_does_wall="yes", cpp_does_wall="no")
|
||||
if test "x$cpp_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ pre-processor
|
||||
CPPFLAGS="${CPPFLAGS} $wall_flags"
|
||||
fi
|
||||
|
||||
dnl --- check for required libraries ---
|
||||
dnl system libraries
|
||||
AC_CHECK_FUNCS([strchr memmove])
|
||||
AC_FUNC_MALLOC
|
||||
AC_HEADER_STDBOOL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CONFIG_FILES([Makefile portSMF.pc portSMF-uninstalled.pc])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo ""
|
||||
echo "Run 'configure --help' for an explanation of the possible options,"
|
||||
echo "otherwise run 'make' to build portSMF."
|
||||
|
||||
dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
dnl version control system. Please do not modify past this point.
|
||||
# Local Variables:
|
||||
# c-basic-offset: 3
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
#
|
||||
# vim: et sts=3 sw=3
|
||||
dnl
|
||||
dnl portSMF configure.in script - version not using libtool
|
||||
dnl
|
||||
dnl Joshua Haberman
|
||||
dnl Dominic Mazzoni
|
||||
dnl Richard Ash
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Instructions: to create "configure" from "configure.in", run:
|
||||
dnl aclocal
|
||||
dnl autoconf
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Require autoconf >= 2.61
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl Init autoconf and automake
|
||||
AC_INIT([portSMF],[0.1])
|
||||
dnl check that we have some source code
|
||||
AC_CONFIG_SRCDIR([allegro.h])
|
||||
dnl keep autools files in a subdirectory
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
# which also contains a subdir containing macros
|
||||
AC_CONFIG_MACRO_DIR([autotools/m4])
|
||||
dnl set up automake
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
dnl Audacity policy: don't enable automatic rebuild of configure et al if
|
||||
dnl sources change
|
||||
AM_MAINTAINER_MODE([enabled])
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------
|
||||
dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2"
|
||||
dnl if $CFLAGS is blank and it finds GCC
|
||||
cflags_save="$CFLAGS"
|
||||
cppflags_save="$CPPFLAGS"
|
||||
cxxflags_save="$CXXFLAGS"
|
||||
AC_PROG_CC
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
dnl we will need an "install" program to be available
|
||||
AC_PROG_INSTALL
|
||||
dnl and ranlib for static libraries
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Make the install prefix available to the program so that the pkg-config file
|
||||
dnl can be created correctly
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
if [[ $prefix = "NONE" ]] ; then
|
||||
AC_DEFINE(INSTALL_PREFIX, "/usr/local",
|
||||
[define as prefix where Audacity is installed])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix")
|
||||
fi
|
||||
|
||||
dnl Build Options
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[enable debug support [default=no]])],
|
||||
debug_preference="$enableval",
|
||||
debug_preference="no")
|
||||
|
||||
dnl ----------------------------------------------------
|
||||
dnl If user asked for debug, put debug in compiler flags
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
dnl we want debuging on
|
||||
AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -g "
|
||||
CXXFLAGS="${CXXFLAGS} -g "
|
||||
fi
|
||||
|
||||
dnl --------------------------------------------------------------------------
|
||||
dnl We would like warnings enabled on the builds, but different compilers need
|
||||
dnl different options for these. This bit tries to work out what flags we
|
||||
dnl should add to the compiler we are using.
|
||||
dnl --------------------------------------------------------------------------
|
||||
|
||||
dnl Strict prototypes flags for C (only C because doesn't work for C++)
|
||||
AX_CFLAGS_STRICT_PROTOTYPES(CFLAGS)
|
||||
|
||||
dnl Sensible warnings for C
|
||||
AX_CFLAGS_WARN_ALL(wall_flags)
|
||||
CFLAGS="${CFLAGS} $wall_flags"
|
||||
dnl try and use it on C++ as well
|
||||
AX_CXX_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cxx_does_wall="yes", cxx_does_wall="no")
|
||||
if test "x$cxx_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ compiler
|
||||
CXXFLAGS="${CXXFLAGS} $wall_flags"
|
||||
fi
|
||||
AX_CXXCPP_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cpp_does_wall="yes", cpp_does_wall="no")
|
||||
if test "x$cpp_does_wall" = "xyes" ; then
|
||||
dnl can use all warnings flag on the C++ pre-processor
|
||||
CPPFLAGS="${CPPFLAGS} $wall_flags"
|
||||
fi
|
||||
|
||||
dnl --- check for required libraries ---
|
||||
dnl system libraries
|
||||
AC_CHECK_FUNCS([strchr memmove])
|
||||
AC_FUNC_MALLOC
|
||||
AC_HEADER_STDBOOL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CONFIG_FILES([Makefile portSMF.pc portSMF-uninstalled.pc])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo ""
|
||||
echo "Run 'configure --help' for an explanation of the possible options,"
|
||||
echo "otherwise run 'make' to build portSMF."
|
||||
|
||||
dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
dnl version control system. Please do not modify past this point.
|
||||
# Local Variables:
|
||||
# c-basic-offset: 3
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
#
|
||||
# vim: et sts=3 sw=3
|
||||
|
||||
@@ -1,586 +0,0 @@
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
RCS file: /cvsroot/audacity/lib-src/portsmf/configure.ac,v
|
||||
retrieving revision 1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -r1.1 -r1.2
|
||||
--- configure.ac 14 Jul 2008 19:37:22 -0000 1.1
|
||||
+++ configure.ac 20 Sep 2008 19:11:13 -0000 1.2
|
||||
@@ -13,13 +13,17 @@
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
-dnl Require autoconf >= 2.60
|
||||
+dnl Require autoconf >= 2.61
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl Init autoconf and automake
|
||||
AC_INIT([portSMF],[0.1])
|
||||
+dnl check that we have some source code
|
||||
+AC_CONFIG_SRCDIR([allegro.h])
|
||||
dnl keep autools files in a subdirectory
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
+# which also contains a subdir containing macros
|
||||
+AC_CONFIG_MACRO_DIR([autotools/m4])
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
Index: Makefile.am
|
||||
===================================================================
|
||||
RCS file: /cvsroot/audacity/lib-src/portsmf/Makefile.am,v
|
||||
retrieving revision 1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -r1.1 -r1.2
|
||||
--- Makefile.am 14 Jul 2008 19:37:21 -0000 1.1
|
||||
+++ Makefile.am 20 Sep 2008 19:11:13 -0000 1.2
|
||||
@@ -1,7 +1,10 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
# Makefile(.in) for portSMF using Autotools (but not libtool).
|
||||
# Written by Richard Ash following Gary Vaughan's Autobook
|
||||
-#
|
||||
+
|
||||
+# tell aclocal that extra macros can be found in autotools/m4/
|
||||
+ACLOCAL_AMFLAGS = -I autotools/m4
|
||||
+
|
||||
# define the output library (link with -lportSMF)
|
||||
lib_LIBRARIES = libportSMF.a
|
||||
|
||||
Index: autotools/m4/ax_cflags_strict_prototypes.m4
|
||||
===================================================================
|
||||
RCS file: autotools/m4/ax_cflags_strict_prototypes.m4
|
||||
diff -N autotools/m4/ax_cflags_strict_prototypes.m4
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ autotools/m4/ax_cflags_strict_prototypes.m4 20 Sep 2008 19:11:14 -0000 1.1
|
||||
@@ -0,0 +1,173 @@
|
||||
+##### http://autoconf-archive.cryp.to/ax_cflags_strict_prototypes.html
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# Try to find a compiler option that requires strict prototypes.
|
||||
+#
|
||||
+# The sanity check is done by looking at sys/signal.h which has a set
|
||||
+# of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
|
||||
+# signal-handler type. If that signal-handler type is not fully
|
||||
+# qualified then the system headers are not seen as strictly
|
||||
+# prototype clean.
|
||||
+#
|
||||
+# For the GNU CC compiler it will be -fstrict-prototypes
|
||||
+# -Wstrict-prototypes The result is added to the shellvar being
|
||||
+# CFLAGS by default.
|
||||
+#
|
||||
+# DEFAULTS:
|
||||
+#
|
||||
+# - $1 shell-variable-to-add-to : CFLAGS
|
||||
+# - $2 add-value-if-not-found : nothing
|
||||
+# - $3 action-if-found : add value to shellvariable
|
||||
+# - $4 action-if-not-found : nothing
|
||||
+#
|
||||
+# LAST MODIFICATION
|
||||
+#
|
||||
+# 2006-12-12
|
||||
+#
|
||||
+# COPYLEFT
|
||||
+#
|
||||
+# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or
|
||||
+# modify it under the terms of the GNU General Public License as
|
||||
+# published by the Free Software Foundation; either version 2 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
+# 02111-1307, USA.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright
|
||||
+# owner gives unlimited permission to copy, distribute and modify the
|
||||
+# configure scripts that are the output of Autoconf when processing
|
||||
+# the Macro. You need not follow the terms of the GNU General Public
|
||||
+# License when using or distributing such scripts, even though
|
||||
+# portions of the text of the Macro appear in them. The GNU General
|
||||
+# Public License (GPL) does govern all other use of the material that
|
||||
+# constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the
|
||||
+# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
+# make and distribute a modified version of the Autoconf Macro, you
|
||||
+# may extend this special exception to the GPL to apply to your
|
||||
+# modified version as well.
|
||||
+
|
||||
+AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
|
||||
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
+VAR,[VAR="no, unknown"
|
||||
+ AC_LANG_SAVE
|
||||
+ AC_LANG_C
|
||||
+ ac_save_[]FLAGS="$[]FLAGS"
|
||||
+for ac_arg dnl
|
||||
+in "-pedantic % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
+ "-pedantic % -Wstrict-prototypes" dnl try to warn atleast
|
||||
+ "-pedantic % -Wmissing-prototypes" dnl or another warning
|
||||
+ "-pedantic % -Werror-implicit-function-declaration" dnl
|
||||
+ "-pedantic % -Wimplicit-function-declaration" dnl
|
||||
+ #
|
||||
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
+ AC_TRY_COMPILE([],[return 0;],
|
||||
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
+done
|
||||
+case ".$VAR" in
|
||||
+ .|.no|.no,*) ;;
|
||||
+ *) # sanity check with signal() from sys/signal.h
|
||||
+ cp config.log config.tmp
|
||||
+ AC_TRY_COMPILE([#include <signal.h>],[
|
||||
+ if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
+ if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
+ dnl the original did use test -n `$CC testprogram.c`
|
||||
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
+then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
+then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
+ [VAR="no, suppressed, signal.h"])
|
||||
+ rm config.tmp
|
||||
+ ;;
|
||||
+esac
|
||||
+ FLAGS="$ac_save_[]FLAGS"
|
||||
+ AC_LANG_RESTORE
|
||||
+])
|
||||
+case ".$VAR" in
|
||||
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
+ *) m4_ifvaln($3,$3,[
|
||||
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
+ fi ]) ;;
|
||||
+esac
|
||||
+AS_VAR_POPDEF([VAR])dnl
|
||||
+AS_VAR_POPDEF([FLAGS])dnl
|
||||
+])
|
||||
+
|
||||
+dnl the only difference - the LANG selection... and the default FLAGS
|
||||
+
|
||||
+AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
|
||||
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
+VAR,[VAR="no, unknown"
|
||||
+ AC_LANG_SAVE
|
||||
+ AC_LANG_CPLUSPLUS
|
||||
+ ac_save_[]FLAGS="$[]FLAGS"
|
||||
+for ac_arg dnl
|
||||
+in "-pedantic -Werror % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
+ "-pedantic -Werror % -Wstrict-prototypes" dnl try to warn atleast
|
||||
+ "-pedantic -Werror % -Wmissing-prototypes" dnl try to warn atleast
|
||||
+ "-pedantic -Werror % -Werror-implicit-function-declaration" dnl
|
||||
+ "-pedantic -Werror % -Wimplicit-function-declaration" dnl
|
||||
+ "-pedantic % -Wstrict-prototypes %% no, unsupported in C++" dnl oops
|
||||
+ #
|
||||
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
+ AC_TRY_COMPILE([],[return 0;],
|
||||
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
+done
|
||||
+case ".$VAR" in
|
||||
+ .|.no|.no,*) ;;
|
||||
+ *) # sanity check with signal() from sys/signal.h
|
||||
+ cp config.log config.tmp
|
||||
+ AC_TRY_COMPILE([#include <signal.h>],[
|
||||
+ if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
+ if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
+ dnl the original did use test -n `$CC testprogram.c`
|
||||
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
+then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
+then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
+ [VAR="no, suppressed, signal.h"])
|
||||
+ rm config.tmp
|
||||
+ ;;
|
||||
+esac
|
||||
+ FLAGS="$ac_save_[]FLAGS"
|
||||
+ AC_LANG_RESTORE
|
||||
+])
|
||||
+case ".$VAR" in
|
||||
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
+ *) m4_ifvaln($3,$3,[
|
||||
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
+ fi ]) ;;
|
||||
+esac
|
||||
+AS_VAR_POPDEF([VAR])dnl
|
||||
+AS_VAR_POPDEF([FLAGS])dnl
|
||||
+])
|
||||
Index: autotools/m4/ax_cflags_warn_all.m4
|
||||
===================================================================
|
||||
RCS file: autotools/m4/ax_cflags_warn_all.m4
|
||||
diff -N autotools/m4/ax_cflags_warn_all.m4
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ autotools/m4/ax_cflags_warn_all.m4 20 Sep 2008 19:11:14 -0000 1.1
|
||||
@@ -0,0 +1,158 @@
|
||||
+##### http://autoconf-archive.cryp.to/ax_cflags_warn_all.html
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# Try to find a compiler option that enables most reasonable
|
||||
+# warnings. This macro is directly derived from VL_PROG_CC_WARNINGS
|
||||
+# which is split up into two AX_CFLAGS_WARN_ALL and
|
||||
+# AX_CFLAGS_WARN_ALL_ANSI
|
||||
+#
|
||||
+# For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
|
||||
+# result is added to the shellvar being CFLAGS by default.
|
||||
+#
|
||||
+# Currently this macro knows about GCC, Solaris C compiler, Digital
|
||||
+# Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
|
||||
+# compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
|
||||
+# 10.0.0.8) C compiler.
|
||||
+#
|
||||
+# - $1 shell-variable-to-add-to : CFLAGS
|
||||
+# - $2 add-value-if-not-found : nothing
|
||||
+# - $3 action-if-found : add value to shellvariable
|
||||
+# - $4 action-if-not-found : nothing
|
||||
+#
|
||||
+# LAST MODIFICATION
|
||||
+#
|
||||
+# 2006-12-12
|
||||
+#
|
||||
+# COPYLEFT
|
||||
+#
|
||||
+# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or
|
||||
+# modify it under the terms of the GNU General Public License as
|
||||
+# published by the Free Software Foundation; either version 2 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
+# 02111-1307, USA.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright
|
||||
+# owner gives unlimited permission to copy, distribute and modify the
|
||||
+# configure scripts that are the output of Autoconf when processing
|
||||
+# the Macro. You need not follow the terms of the GNU General Public
|
||||
+# License when using or distributing such scripts, even though
|
||||
+# portions of the text of the Macro appear in them. The GNU General
|
||||
+# Public License (GPL) does govern all other use of the material that
|
||||
+# constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the
|
||||
+# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
+# make and distribute a modified version of the Autoconf Macro, you
|
||||
+# may extend this special exception to the GPL to apply to your
|
||||
+# modified version as well.
|
||||
+
|
||||
+AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
|
||||
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
|
||||
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
+VAR,[VAR="no, unknown"
|
||||
+ AC_LANG_SAVE
|
||||
+ AC_LANG_C
|
||||
+ ac_save_[]FLAGS="$[]FLAGS"
|
||||
+for ac_arg dnl
|
||||
+in "-pedantic % -Wall" dnl GCC
|
||||
+ "-xstrconst % -v" dnl Solaris C
|
||||
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
+ "-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
+ "+ESlit % +w1" dnl HP-UX C
|
||||
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
+ #
|
||||
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
+ AC_TRY_COMPILE([],[return 0;],
|
||||
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
+done
|
||||
+ FLAGS="$ac_save_[]FLAGS"
|
||||
+ AC_LANG_RESTORE
|
||||
+])
|
||||
+case ".$VAR" in
|
||||
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
+ *) m4_ifvaln($3,$3,[
|
||||
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
+ fi ]) ;;
|
||||
+esac
|
||||
+AS_VAR_POPDEF([VAR])dnl
|
||||
+AS_VAR_POPDEF([FLAGS])dnl
|
||||
+])
|
||||
+
|
||||
+dnl the only difference - the LANG selection... and the default FLAGS
|
||||
+
|
||||
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
|
||||
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
|
||||
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
+VAR,[VAR="no, unknown"
|
||||
+ AC_LANG_SAVE
|
||||
+ AC_LANG_CPLUSPLUS
|
||||
+ ac_save_[]FLAGS="$[]FLAGS"
|
||||
+for ac_arg dnl
|
||||
+in "-pedantic % -Wall" dnl GCC
|
||||
+ "-xstrconst % -v" dnl Solaris C
|
||||
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
+ "-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
+ "+ESlit % +w1" dnl HP-UX C
|
||||
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
+ #
|
||||
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
+ AC_TRY_COMPILE([],[return 0;],
|
||||
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
+done
|
||||
+ FLAGS="$ac_save_[]FLAGS"
|
||||
+ AC_LANG_RESTORE
|
||||
+])
|
||||
+case ".$VAR" in
|
||||
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
+ *) m4_ifvaln($3,$3,[
|
||||
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
+ fi ]) ;;
|
||||
+esac
|
||||
+AS_VAR_POPDEF([VAR])dnl
|
||||
+AS_VAR_POPDEF([FLAGS])dnl
|
||||
+])
|
||||
+
|
||||
+dnl implementation tactics:
|
||||
+dnl the for-argument contains a list of options. The first part of
|
||||
+dnl these does only exist to detect the compiler - usually it is
|
||||
+dnl a global option to enable -ansi or -extrawarnings. All other
|
||||
+dnl compilers will fail about it. That was needed since a lot of
|
||||
+dnl compilers will give false positives for some option-syntax
|
||||
+dnl like -Woption or -Xoption as they think of it is a pass-through
|
||||
+dnl to later compile stages or something. The "%" is used as a
|
||||
+dnl delimimiter. A non-option comment can be given after "%%" marks
|
||||
+dnl which will be shown but not added to the respective C/CXXFLAGS.
|
||||
Index: autotools/m4/ax_cxx_check_flag.m4
|
||||
===================================================================
|
||||
RCS file: autotools/m4/ax_cxx_check_flag.m4
|
||||
diff -N autotools/m4/ax_cxx_check_flag.m4
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ autotools/m4/ax_cxx_check_flag.m4 20 Sep 2008 19:11:14 -0000 1.1
|
||||
@@ -0,0 +1,90 @@
|
||||
+##### http://autoconf-archive.cryp.to/ax_cxx_check_flag.html
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CXX_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# This macro tests if the C++ compiler supports the flag
|
||||
+# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
+# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
+# used as in AC_LANG_PROGRAM macro.
|
||||
+#
|
||||
+# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
+# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
+#
|
||||
+# LAST MODIFICATION
|
||||
+#
|
||||
+# 2007-11-26
|
||||
+#
|
||||
+# COPYLEFT
|
||||
+#
|
||||
+# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or
|
||||
+# modify it under the terms of the GNU General Public License as
|
||||
+# published by the Free Software Foundation; either version 2 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
+# 02111-1307, USA.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright
|
||||
+# owner gives unlimited permission to copy, distribute and modify the
|
||||
+# configure scripts that are the output of Autoconf when processing
|
||||
+# the Macro. You need not follow the terms of the GNU General Public
|
||||
+# License when using or distributing such scripts, even though
|
||||
+# portions of the text of the Macro appear in them. The GNU General
|
||||
+# Public License (GPL) does govern all other use of the material that
|
||||
+# constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the
|
||||
+# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
+# make and distribute a modified version of the Autoconf Macro, you
|
||||
+# may extend this special exception to the GPL to apply to your
|
||||
+# modified version as well.
|
||||
+
|
||||
+AC_DEFUN([AX_CXX_CHECK_FLAG],[
|
||||
+ AC_PREREQ([2.61])
|
||||
+ AC_REQUIRE([AC_PROG_CXX])
|
||||
+ AC_REQUIRE([AC_PROG_SED])
|
||||
+
|
||||
+ flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
+
|
||||
+ AC_CACHE_CHECK([whether the C++ compiler accepts the $1 flag],
|
||||
+ [ax_cv_cxx_check_flag_$flag],[
|
||||
+
|
||||
+ AC_LANG_PUSH([C++])
|
||||
+
|
||||
+ save_CXXFLAGS="$CXXFLAGS"
|
||||
+ CXXFLAGS="$CXXFLAGS $1"
|
||||
+ AC_COMPILE_IFELSE([
|
||||
+ AC_LANG_PROGRAM([$2],[$3])
|
||||
+ ],[
|
||||
+ eval "ax_cv_cxx_check_flag_$flag=yes"
|
||||
+ ],[
|
||||
+ eval "ax_cv_cxx_check_flag_$flag=no"
|
||||
+ ])
|
||||
+
|
||||
+ CXXFLAGS="$save_CXXFLAGS"
|
||||
+
|
||||
+ AC_LANG_POP
|
||||
+
|
||||
+ ])
|
||||
+
|
||||
+ AS_IF([eval "test \"`echo '$ax_cv_cxx_check_flag_'$flag`\" = yes"],[
|
||||
+ :
|
||||
+ $4
|
||||
+ ],[
|
||||
+ :
|
||||
+ $5
|
||||
+ ])
|
||||
+])
|
||||
Index: autotools/m4/ax_cxxcpp_check_flag.m4
|
||||
===================================================================
|
||||
RCS file: autotools/m4/ax_cxxcpp_check_flag.m4
|
||||
diff -N autotools/m4/ax_cxxcpp_check_flag.m4
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ autotools/m4/ax_cxxcpp_check_flag.m4 20 Sep 2008 19:11:14 -0000 1.1
|
||||
@@ -0,0 +1,90 @@
|
||||
+##### http://autoconf-archive.cryp.to/ax_cxxcpp_check_flag.html
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CXXCPP_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# This macro tests if the C++ preprocessor supports the flag
|
||||
+# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
+# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
+# used as in AC_LANG_PROGRAM macro.
|
||||
+#
|
||||
+# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
+# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
+#
|
||||
+# LAST MODIFICATION
|
||||
+#
|
||||
+# 2007-11-26
|
||||
+#
|
||||
+# COPYLEFT
|
||||
+#
|
||||
+# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or
|
||||
+# modify it under the terms of the GNU General Public License as
|
||||
+# published by the Free Software Foundation; either version 2 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
+# 02111-1307, USA.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright
|
||||
+# owner gives unlimited permission to copy, distribute and modify the
|
||||
+# configure scripts that are the output of Autoconf when processing
|
||||
+# the Macro. You need not follow the terms of the GNU General Public
|
||||
+# License when using or distributing such scripts, even though
|
||||
+# portions of the text of the Macro appear in them. The GNU General
|
||||
+# Public License (GPL) does govern all other use of the material that
|
||||
+# constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the
|
||||
+# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
+# make and distribute a modified version of the Autoconf Macro, you
|
||||
+# may extend this special exception to the GPL to apply to your
|
||||
+# modified version as well.
|
||||
+
|
||||
+AC_DEFUN([AX_CXXCPP_CHECK_FLAG],[
|
||||
+ AC_PREREQ([2.61])
|
||||
+ AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
+ AC_REQUIRE([AC_PROG_SED])
|
||||
+
|
||||
+ flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
+
|
||||
+ AC_CACHE_CHECK([whether the C++ preprocessor accepts the $1 flag],
|
||||
+ [ax_cv_cxxcpp_check_flag_$flag],[
|
||||
+
|
||||
+ AC_LANG_PUSH([C++])
|
||||
+
|
||||
+ save_CXXFLAGS="$CXXFLAGS"
|
||||
+ CXXFLAGS="$CXXFLAGS $1"
|
||||
+ AC_PREPROC_IFELSE([
|
||||
+ AC_LANG_PROGRAM([$2],[$3])
|
||||
+ ],[
|
||||
+ eval "ax_cv_cxxcpp_check_flag_$flag=yes"
|
||||
+ ],[
|
||||
+ eval "ax_cv_cxxcpp_check_flag_$flag=no"
|
||||
+ ])
|
||||
+
|
||||
+ CXXFLAGS="$save_CXXFLAGS"
|
||||
+
|
||||
+ AC_LANG_POP
|
||||
+
|
||||
+ ])
|
||||
+
|
||||
+ AS_IF([eval "test \"`echo '$ax_cv_cxxcpp_check_flag_'$flag`\" = yes"],[
|
||||
+ :
|
||||
+ $4
|
||||
+ ],[
|
||||
+ :
|
||||
+ $5
|
||||
+ ])
|
||||
+])
|
||||
@@ -1,16 +1,16 @@
|
||||
# This pkg-config file lets you use the compiled lib without having to first
|
||||
# install it anywhere. Simply put the directory the pkg-config file is in on the
|
||||
# PKG_CONFIG_PATH and look for portSMF as normal - the uninstalled file
|
||||
# is prefered to the installed one if both are found
|
||||
libdir=@abs_builddir@
|
||||
# The library always ends up in the build dir.
|
||||
includedir=@abs_srcdir@
|
||||
# The headers are always in the source dir
|
||||
|
||||
Name: portSMF
|
||||
Description: Portmedia Simple Midi File library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lportSMF @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
||||
# This pkg-config file lets you use the compiled lib without having to first
|
||||
# install it anywhere. Simply put the directory the pkg-config file is in on the
|
||||
# PKG_CONFIG_PATH and look for portSMF as normal - the uninstalled file
|
||||
# is prefered to the installed one if both are found
|
||||
libdir=@abs_builddir@
|
||||
# The library always ends up in the build dir.
|
||||
includedir=@abs_srcdir@
|
||||
# The headers are always in the source dir
|
||||
|
||||
Name: portSMF
|
||||
Description: Portmedia Simple Midi File library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lportSMF @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: portSMF
|
||||
Description: Portmedia Simple Midi File library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lportSMF @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: portSMF
|
||||
Description: Portmedia Simple Midi File library
|
||||
Requires:
|
||||
Version: 0.1
|
||||
|
||||
Libs: -L${libdir} -lportSMF @LIBS@
|
||||
Cflags: -I${includedir} @CXXFLAGS@
|
||||
|
||||
29
lib-src/portsmf/portsmf-VC8.sln
Normal file
29
lib-src/portsmf/portsmf-VC8.sln
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf-VC8.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test-VC8.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
213
lib-src/portsmf/portsmf-VC8.vcproj
Normal file
213
lib-src/portsmf/portsmf-VC8.vcproj
Normal file
@@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="portsmf"
|
||||
ProjectGUID="{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}"
|
||||
RootNamespace="allegro"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="0"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\allegro.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\allegrord.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\allegrosmfrd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\allegrosmfwr.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\allegrowr.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mfmidi.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strparse.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\trace.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\allegro.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mfmidi.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strparse.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\trace.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,9 +0,0 @@
|
||||
diff -u -r1.1 -r1.2
|
||||
--- lib-src/portsmf/strparse.cpp 11 Jul 2008 15:39:25 -0000 1.1
|
||||
+++ lib-src/portsmf/strparse.cpp 28 Jul 2008 19:54:09 -0000 1.2
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <string>
|
||||
+#include <cstring>
|
||||
// #include <iostream> -- for debugging (cout)
|
||||
#include "ctype.h"
|
||||
using namespace std;
|
||||
@@ -1,44 +0,0 @@
|
||||
Index: lib-src/portsmf/strparse.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/audacity/lib-src/portsmf/strparse.cpp,v
|
||||
retrieving revision 1.3
|
||||
diff -u -r1.3 strparse.cpp
|
||||
--- lib-src/portsmf/strparse.cpp 6 Aug 2008 17:57:54 -0000 1.3
|
||||
+++ lib-src/portsmf/strparse.cpp 3 Sep 2008 07:10:44 -0000
|
||||
@@ -48,10 +48,10 @@
|
||||
}
|
||||
|
||||
|
||||
-char *escape_chars[] = {"\\n", "\\t", "\\\\", "\\r", "\\\""};
|
||||
+static const char *const escape_chars[] = {"\\n", "\\t", "\\\\", "\\r", "\\\""};
|
||||
|
||||
|
||||
-void string_escape(string &result, char *str, char *quote)
|
||||
+void string_escape(string &result, const char *str, const char *quote)
|
||||
{
|
||||
int length = (int) strlen(str);
|
||||
if (quote[0]) {
|
||||
@@ -59,8 +59,8 @@
|
||||
}
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (!isalnum((unsigned char) str[i])) {
|
||||
- char *chars = "\n\t\\\r\"";
|
||||
- char *special = strchr(chars, str[i]);
|
||||
+ const char *const chars = "\n\t\\\r\"";
|
||||
+ const char *const special = strchr(chars, str[i]);
|
||||
if (special) {
|
||||
result.append(escape_chars[special - chars]);
|
||||
} else {
|
||||
Index: lib-src/portsmf/strparse.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/audacity/lib-src/portsmf/strparse.h,v
|
||||
retrieving revision 1.2
|
||||
diff -u -r1.2 strparse.h
|
||||
--- lib-src/portsmf/strparse.h 6 Aug 2008 17:57:54 -0000 1.2
|
||||
+++ lib-src/portsmf/strparse.h 3 Sep 2008 07:10:53 -0000
|
||||
@@ -15,4 +15,4 @@
|
||||
void get_remainder(std::string &field);
|
||||
};
|
||||
|
||||
-void string_escape(std::string &result, char *s, char *quote);
|
||||
+void string_escape(std::string &result, const char *s, const char *quote);
|
||||
35
lib-src/portsmf/portsmf.sln
Normal file
35
lib-src/portsmf/portsmf.sln
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allegroconvert", "apps\allegroconvert.vcproj", "{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32
|
||||
{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.ActiveCfg = Debug|Win32
|
||||
{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.Build.0 = Debug|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
lib-src/portsmf/portsmf.suo
Normal file
BIN
lib-src/portsmf/portsmf.suo
Normal file
Binary file not shown.
603
lib-src/portsmf/portsmf.xcodeproj/project.pbxproj
Normal file
603
lib-src/portsmf/portsmf.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,603 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3D6906EE0E1BC84300CD7F1A /* portsmf_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D6906ED0E1BC84300CD7F1A /* portsmf_test.cpp */; };
|
||||
3D6906EF0E1BC86800CD7F1A /* libportsmf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */; };
|
||||
3D6906F30E1BC9E400CD7F1A /* strparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8F70C73C9B700DB0C03 /* strparse.cpp */; };
|
||||
3D69074B0E1BDC0200CD7F1A /* portmidi_s.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D69074A0E1BDC0200CD7F1A /* portmidi_s.a */; };
|
||||
3D69074E0E1BDC5200CD7F1A /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D69074D0E1BDC5200CD7F1A /* CoreServices.framework */; };
|
||||
3D84C8D00C73C6A000DB0C03 /* allegro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8CE0C73C6A000DB0C03 /* allegro.cpp */; };
|
||||
3D84C8D10C73C6A000DB0C03 /* allegro.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D84C8CF0C73C6A000DB0C03 /* allegro.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3D84C8D70C73C6B600DB0C03 /* allegrord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8D20C73C6B600DB0C03 /* allegrord.cpp */; };
|
||||
3D84C8D80C73C6B600DB0C03 /* allegroserial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8D30C73C6B600DB0C03 /* allegroserial.cpp */; };
|
||||
3D84C8D90C73C6B600DB0C03 /* allegrosmfrd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8D40C73C6B600DB0C03 /* allegrosmfrd.cpp */; };
|
||||
3D84C8DA0C73C6B600DB0C03 /* allegrosmfwr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8D50C73C6B600DB0C03 /* allegrosmfwr.cpp */; };
|
||||
3D84C8DB0C73C6B600DB0C03 /* allegrowr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8D60C73C6B600DB0C03 /* allegrowr.cpp */; };
|
||||
3D84C8DE0C73C6C900DB0C03 /* mfmidi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8DC0C73C6C900DB0C03 /* mfmidi.cpp */; };
|
||||
3D84C8DF0C73C6C900DB0C03 /* mfmidi.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D84C8DD0C73C6C900DB0C03 /* mfmidi.h */; };
|
||||
3D84C8E10C73C6F900DB0C03 /* allegroconvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8E00C73C6F900DB0C03 /* allegroconvert.cpp */; };
|
||||
3D84C8E30C73C71900DB0C03 /* allegroplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8E20C73C71900DB0C03 /* allegroplay.cpp */; };
|
||||
3D84C8F20C73C8BC00DB0C03 /* libportsmf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */; };
|
||||
3D84C8F30C73C8C500DB0C03 /* libportsmf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */; };
|
||||
3D84C9DB0C75388500DB0C03 /* seq2midi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C9DA0C75388500DB0C03 /* seq2midi.cpp */; };
|
||||
3D84CA5A0C75487500DB0C03 /* CoreMIDI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84CA590C75487500DB0C03 /* CoreMIDI.framework */; };
|
||||
3D84CA5C0C75489400DB0C03 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84CA5B0C75489400DB0C03 /* CoreAudio.framework */; };
|
||||
3D84CA5E0C7548AC00DB0C03 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D84CA5D0C7548AC00DB0C03 /* CoreFoundation.framework */; };
|
||||
3D84CA600C7548D300DB0C03 /* strparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84C8F70C73C9B700DB0C03 /* strparse.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3D6906CA0E1BC43800CD7F1A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3D84C8B90C73C64B00DB0C03;
|
||||
remoteInfo = portsmf;
|
||||
};
|
||||
3D84C95A0C74EC5000DB0C03 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3D84C8B90C73C64B00DB0C03;
|
||||
remoteInfo = portsmf;
|
||||
};
|
||||
3D84C95C0C74EC8100DB0C03 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3D84C8B90C73C64B00DB0C03;
|
||||
remoteInfo = portsmf;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3D6906C20E1BC42D00CD7F1A /* portsmf_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = portsmf_test; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3D6906ED0E1BC84300CD7F1A /* portsmf_test.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = portsmf_test.cpp; path = portsmf_test/portsmf_test.cpp; sourceTree = "<group>"; };
|
||||
3D69074A0E1BDC0200CD7F1A /* portmidi_s.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = portmidi_s.a; path = ../portmidi/portmidi_s.a; sourceTree = SOURCE_ROOT; };
|
||||
3D69074D0E1BDC5200CD7F1A /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libportsmf.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3D84C8C10C73C66E00DB0C03 /* allegroconvert */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = allegroconvert; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3D84C8C60C73C67E00DB0C03 /* allegroplay */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = allegroplay; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3D84C8CE0C73C6A000DB0C03 /* allegro.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegro.cpp; sourceTree = "<group>"; };
|
||||
3D84C8CF0C73C6A000DB0C03 /* allegro.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = allegro.h; sourceTree = "<group>"; };
|
||||
3D84C8D20C73C6B600DB0C03 /* allegrord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegrord.cpp; sourceTree = "<group>"; };
|
||||
3D84C8D30C73C6B600DB0C03 /* allegroserial.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegroserial.cpp; sourceTree = "<group>"; };
|
||||
3D84C8D40C73C6B600DB0C03 /* allegrosmfrd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegrosmfrd.cpp; sourceTree = "<group>"; };
|
||||
3D84C8D50C73C6B600DB0C03 /* allegrosmfwr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegrosmfwr.cpp; sourceTree = "<group>"; };
|
||||
3D84C8D60C73C6B600DB0C03 /* allegrowr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = allegrowr.cpp; sourceTree = "<group>"; };
|
||||
3D84C8DC0C73C6C900DB0C03 /* mfmidi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mfmidi.cpp; sourceTree = "<group>"; };
|
||||
3D84C8DD0C73C6C900DB0C03 /* mfmidi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mfmidi.h; sourceTree = "<group>"; };
|
||||
3D84C8E00C73C6F900DB0C03 /* allegroconvert.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = allegroconvert.cpp; path = apps/allegroconvert.cpp; sourceTree = "<group>"; };
|
||||
3D84C8E20C73C71900DB0C03 /* allegroplay.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = allegroplay.cpp; path = apps/allegroplay.cpp; sourceTree = "<group>"; };
|
||||
3D84C8F70C73C9B700DB0C03 /* strparse.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = strparse.cpp; sourceTree = "<group>"; };
|
||||
3D84C8F80C73C9B700DB0C03 /* strparse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = strparse.h; sourceTree = "<group>"; };
|
||||
3D84C9DA0C75388500DB0C03 /* seq2midi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = seq2midi.cpp; path = apps/seq2midi.cpp; sourceTree = "<group>"; };
|
||||
3D84C9DC0C7538A300DB0C03 /* seq2midi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = seq2midi.h; path = apps/seq2midi.h; sourceTree = "<group>"; };
|
||||
3D84C9F30C753A0400DB0C03 /* midicode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = midicode.h; path = apps/midicode.h; sourceTree = "<group>"; };
|
||||
3D84CA590C75487500DB0C03 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
|
||||
3D84CA5B0C75489400DB0C03 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
3D84CA5D0C7548AC00DB0C03 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3D6906C00E1BC42D00CD7F1A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D6906EF0E1BC86800CD7F1A /* libportsmf.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8B80C73C64B00DB0C03 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8BF0C73C66E00DB0C03 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D84C8F20C73C8BC00DB0C03 /* libportsmf.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8C40C73C67E00DB0C03 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D84C8F30C73C8C500DB0C03 /* libportsmf.a in Frameworks */,
|
||||
3D84CA5A0C75487500DB0C03 /* CoreMIDI.framework in Frameworks */,
|
||||
3D84CA5C0C75489400DB0C03 /* CoreAudio.framework in Frameworks */,
|
||||
3D84CA5E0C7548AC00DB0C03 /* CoreFoundation.framework in Frameworks */,
|
||||
3D69074B0E1BDC0200CD7F1A /* portmidi_s.a in Frameworks */,
|
||||
3D69074E0E1BDC5200CD7F1A /* CoreServices.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* portsmf */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3D69074D0E1BDC5200CD7F1A /* CoreServices.framework */,
|
||||
3D69074A0E1BDC0200CD7F1A /* portmidi_s.a */,
|
||||
3D6906ED0E1BC84300CD7F1A /* portsmf_test.cpp */,
|
||||
3D84CA5D0C7548AC00DB0C03 /* CoreFoundation.framework */,
|
||||
3D84CA5B0C75489400DB0C03 /* CoreAudio.framework */,
|
||||
3D84CA590C75487500DB0C03 /* CoreMIDI.framework */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
3D84C8CF0C73C6A000DB0C03 /* allegro.h */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = portsmf;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3D84C8CE0C73C6A000DB0C03 /* allegro.cpp */,
|
||||
3D84C8E00C73C6F900DB0C03 /* allegroconvert.cpp */,
|
||||
3D84C8E20C73C71900DB0C03 /* allegroplay.cpp */,
|
||||
3D84C8D20C73C6B600DB0C03 /* allegrord.cpp */,
|
||||
3D84C8D30C73C6B600DB0C03 /* allegroserial.cpp */,
|
||||
3D84C8D40C73C6B600DB0C03 /* allegrosmfrd.cpp */,
|
||||
3D84C8D50C73C6B600DB0C03 /* allegrosmfwr.cpp */,
|
||||
3D84C8D60C73C6B600DB0C03 /* allegrowr.cpp */,
|
||||
3D84C8DC0C73C6C900DB0C03 /* mfmidi.cpp */,
|
||||
3D84C8DD0C73C6C900DB0C03 /* mfmidi.h */,
|
||||
3D84C9F30C753A0400DB0C03 /* midicode.h */,
|
||||
3D84C9DA0C75388500DB0C03 /* seq2midi.cpp */,
|
||||
3D84C9DC0C7538A300DB0C03 /* seq2midi.h */,
|
||||
3D84C8F70C73C9B700DB0C03 /* strparse.cpp */,
|
||||
3D84C8F80C73C9B700DB0C03 /* strparse.h */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */,
|
||||
3D84C8C10C73C66E00DB0C03 /* allegroconvert */,
|
||||
3D84C8C60C73C67E00DB0C03 /* allegroplay */,
|
||||
3D6906C20E1BC42D00CD7F1A /* portsmf_test */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
3D84C8B60C73C64B00DB0C03 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D84C8D10C73C6A000DB0C03 /* allegro.h in Headers */,
|
||||
3D84C8DF0C73C6C900DB0C03 /* mfmidi.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3D6906C10E1BC42D00CD7F1A /* portsmf_test */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3D6906CC0E1BC45700CD7F1A /* Build configuration list for PBXNativeTarget "portsmf_test" */;
|
||||
buildPhases = (
|
||||
3D6906BF0E1BC42D00CD7F1A /* Sources */,
|
||||
3D6906C00E1BC42D00CD7F1A /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3D6906CB0E1BC43800CD7F1A /* PBXTargetDependency */,
|
||||
);
|
||||
name = portsmf_test;
|
||||
productName = portsmf_test;
|
||||
productReference = 3D6906C20E1BC42D00CD7F1A /* portsmf_test */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
3D84C8B90C73C64B00DB0C03 /* portsmf */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3D84C8BB0C73C66A00DB0C03 /* Build configuration list for PBXNativeTarget "portsmf" */;
|
||||
buildPhases = (
|
||||
3D84C8B60C73C64B00DB0C03 /* Headers */,
|
||||
3D84C8B70C73C64B00DB0C03 /* Sources */,
|
||||
3D84C8B80C73C64B00DB0C03 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = portsmf;
|
||||
productName = portsmf;
|
||||
productReference = 3D84C8BA0C73C64B00DB0C03 /* libportsmf.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
3D84C8C00C73C66E00DB0C03 /* allegroconvert */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3D84C8C80C73C69C00DB0C03 /* Build configuration list for PBXNativeTarget "allegroconvert" */;
|
||||
buildPhases = (
|
||||
3D84C8BE0C73C66E00DB0C03 /* Sources */,
|
||||
3D84C8BF0C73C66E00DB0C03 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3D84C95B0C74EC5000DB0C03 /* PBXTargetDependency */,
|
||||
);
|
||||
name = allegroconvert;
|
||||
productName = allegroconvert;
|
||||
productReference = 3D84C8C10C73C66E00DB0C03 /* allegroconvert */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
3D84C8C50C73C67E00DB0C03 /* allegroplay */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3D84C8CB0C73C69C00DB0C03 /* Build configuration list for PBXNativeTarget "allegroplay" */;
|
||||
buildPhases = (
|
||||
3D84C8C30C73C67E00DB0C03 /* Sources */,
|
||||
3D84C8C40C73C67E00DB0C03 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3D84C95D0C74EC8100DB0C03 /* PBXTargetDependency */,
|
||||
);
|
||||
name = allegroplay;
|
||||
productName = allegroplay;
|
||||
productReference = 3D84C8C60C73C67E00DB0C03 /* allegroplay */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "portsmf" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* portsmf */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3D84C8B90C73C64B00DB0C03 /* portsmf */,
|
||||
3D84C8C00C73C66E00DB0C03 /* allegroconvert */,
|
||||
3D84C8C50C73C67E00DB0C03 /* allegroplay */,
|
||||
3D6906C10E1BC42D00CD7F1A /* portsmf_test */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3D6906BF0E1BC42D00CD7F1A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D6906EE0E1BC84300CD7F1A /* portsmf_test.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8B70C73C64B00DB0C03 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D6906F30E1BC9E400CD7F1A /* strparse.cpp in Sources */,
|
||||
3D84C8D00C73C6A000DB0C03 /* allegro.cpp in Sources */,
|
||||
3D84C8D70C73C6B600DB0C03 /* allegrord.cpp in Sources */,
|
||||
3D84C8D80C73C6B600DB0C03 /* allegroserial.cpp in Sources */,
|
||||
3D84C8D90C73C6B600DB0C03 /* allegrosmfrd.cpp in Sources */,
|
||||
3D84C8DA0C73C6B600DB0C03 /* allegrosmfwr.cpp in Sources */,
|
||||
3D84C8DB0C73C6B600DB0C03 /* allegrowr.cpp in Sources */,
|
||||
3D84C8DE0C73C6C900DB0C03 /* mfmidi.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8BE0C73C66E00DB0C03 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D84C8E10C73C6F900DB0C03 /* allegroconvert.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D84C8C30C73C67E00DB0C03 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D84C8E30C73C71900DB0C03 /* allegroplay.cpp in Sources */,
|
||||
3D84C9DB0C75388500DB0C03 /* seq2midi.cpp in Sources */,
|
||||
3D84CA600C7548D300DB0C03 /* strparse.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3D6906CB0E1BC43800CD7F1A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3D84C8B90C73C64B00DB0C03 /* portsmf */;
|
||||
targetProxy = 3D6906CA0E1BC43800CD7F1A /* PBXContainerItemProxy */;
|
||||
};
|
||||
3D84C95B0C74EC5000DB0C03 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3D84C8B90C73C64B00DB0C03 /* portsmf */;
|
||||
targetProxy = 3D84C95A0C74EC5000DB0C03 /* PBXContainerItemProxy */;
|
||||
};
|
||||
3D84C95D0C74EC8100DB0C03 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3D84C8B90C73C64B00DB0C03 /* portsmf */;
|
||||
targetProxy = 3D84C95C0C74EC8100DB0C03 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "NEWBUFFER=1";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
..,
|
||||
.,
|
||||
../portmidi/pm_common,
|
||||
../portmidi/porttime/,
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = ..;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "NEWBUFFER=1";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
..,
|
||||
.,
|
||||
../portmidi/pm_common,
|
||||
../portmidi/porttime/,
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = ..;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3D6906CD0E1BC45700CD7F1A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = "";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = portsmf_test;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3D6906CE0E1BC45700CD7F1A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = portsmf_test;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = portsmf_test;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3D84C8BC0C73C66A00DB0C03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = portsmf;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3D84C8BD0C73C66A00DB0C03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = portsmf;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3D84C8C90C73C69C00DB0C03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\"";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = allegroconvert;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3D84C8CA0C73C69C00DB0C03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\"";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = allegroconvert;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3D84C8CC0C73C69C00DB0C03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_3)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_4)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/Debug\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../portmidi/pm_mac\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_3 = "\"$(SRCROOT)/../portmidi/porttime\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_4 = "\"$(SRCROOT)/../portmidi/pm_mac/build/pm_mac.build/Development/libportmidi.a.build/Objects-normal/i386\"";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = allegroplay;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3D84C8CD0C73C69C00DB0C03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = "$(HOME)/bin";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_3)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_4)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/Release\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../portmidi/pm_mac\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_3 = "\"$(SRCROOT)/../portmidi/porttime\"";
|
||||
LIBRARY_SEARCH_PATHS_QUOTED_4 = "\"$(SRCROOT)/../portmidi/pm_mac/build/pm_mac.build/Development/libportmidi.a.build/Objects-normal/i386\"";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = allegroplay;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "portsmf" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3D6906CC0E1BC45700CD7F1A /* Build configuration list for PBXNativeTarget "portsmf_test" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3D6906CD0E1BC45700CD7F1A /* Debug */,
|
||||
3D6906CE0E1BC45700CD7F1A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3D84C8BB0C73C66A00DB0C03 /* Build configuration list for PBXNativeTarget "portsmf" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3D84C8BC0C73C66A00DB0C03 /* Debug */,
|
||||
3D84C8BD0C73C66A00DB0C03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3D84C8C80C73C69C00DB0C03 /* Build configuration list for PBXNativeTarget "allegroconvert" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3D84C8C90C73C69C00DB0C03 /* Debug */,
|
||||
3D84C8CA0C73C69C00DB0C03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3D84C8CB0C73C69C00DB0C03 /* Build configuration list for PBXNativeTarget "allegroplay" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3D84C8CC0C73C69C00DB0C03 /* Debug */,
|
||||
3D84C8CD0C73C69C00DB0C03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
||||
1349
lib-src/portsmf/portsmf.xcodeproj/rbd.mode1
Normal file
1349
lib-src/portsmf/portsmf.xcodeproj/rbd.mode1
Normal file
File diff suppressed because it is too large
Load Diff
43
lib-src/portsmf/portsmf_test/Makefile.osx
Normal file
43
lib-src/portsmf/portsmf_test/Makefile.osx
Normal file
@@ -0,0 +1,43 @@
|
||||
# portsmf_test Makefile
|
||||
#
|
||||
# This is intended to be run in the portsmf/portsmf_test directory as:
|
||||
# make -f Makefile.osx
|
||||
# to build portsmf_test.
|
||||
#
|
||||
# You can adapt this to build libportsmf.a if you want to use PortSMF
|
||||
# as a library.
|
||||
|
||||
LIBFLAGS =
|
||||
CFLAGS = -g -I$(SMFDIR)
|
||||
CCC = g++
|
||||
CC = gcc
|
||||
SMFDIR = ..
|
||||
|
||||
PORTSMFOBJS = $(SMFDIR)/allegro.o \
|
||||
$(SMFDIR)/allegrosmfwr.o \
|
||||
$(SMFDIR)/allegrord.o \
|
||||
$(SMFDIR)/allegrowr.o \
|
||||
$(SMFDIR)/allegrosmfrd.o \
|
||||
$(SMFDIR)/mfmidi.o \
|
||||
$(SMFDIR)/strparse.o
|
||||
|
||||
PORTSMFHEADERS = $(SMFDIR)/allegro.h \
|
||||
$(SMFDIR)/mfmidi.h \
|
||||
$(SMFDIR)/strparse.h
|
||||
|
||||
OBJS = $(PORTSMFOBJS)
|
||||
|
||||
all: portsmf_test libportsmf.a
|
||||
|
||||
libportsmf.a: $(OBJS) Makefile.osx
|
||||
ar -crs libportsmf.a $(LIBFLAGS) $(OBJS)
|
||||
|
||||
%.o:%.cpp
|
||||
$(CCC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
portsmf_test: libportsmf.a portsmf_test.o $(PORTSMFHEADERS)
|
||||
$(CCC) $(CFLAGS) -o portsmf_test \
|
||||
portsmf_test.o libportsmf.a
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
200
lib-src/portsmf/portsmf_test/portsmf_test-VC8.vcproj
Normal file
200
lib-src/portsmf/portsmf_test/portsmf_test-VC8.vcproj
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="portsmf_test"
|
||||
ProjectGUID="{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}"
|
||||
RootNamespace="allegro_test"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="0"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../Debug/portsmf.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\portsmf_test.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
766
lib-src/portsmf/portsmf_test/portsmf_test.cpp
Normal file
766
lib-src/portsmf/portsmf_test/portsmf_test.cpp
Normal file
@@ -0,0 +1,766 @@
|
||||
#include "memory.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
#include "allegro.h"
|
||||
|
||||
void seq_print(Alg_seq_ptr seq)
|
||||
{
|
||||
for (int i = 0; i < seq->tracks(); i++) {
|
||||
printf("TRACK %d\n", i);
|
||||
for (int j = 0; j < seq->track(i)->length(); j++) {
|
||||
(*seq->track(i))[j]->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Alg_seq_ptr make_simple_score()
|
||||
{
|
||||
Alg_seq_ptr seq = new Alg_seq;
|
||||
Alg_update_ptr update = seq->create_update(0, 0, -1);
|
||||
update->set_real_value("attackr", 0.007);
|
||||
seq->add_event(update, 0);
|
||||
|
||||
Alg_note_ptr note = seq->create_note(0, 0, 63, 63, 105, 0.8);
|
||||
// at 100bpm, dur will be 1.33 beats
|
||||
seq->add_event(note, 0);
|
||||
|
||||
// at 100bpm, time = W0.33 beats, dur = 0.66 beats
|
||||
|
||||
note = seq->create_note(0.8, 0, 65, 65, 107, 0.4);
|
||||
seq->add_event(note, 0);
|
||||
//seq_print(seq);
|
||||
return seq;
|
||||
}
|
||||
|
||||
void test1()
|
||||
{
|
||||
Alg_seq_ptr seq = make_simple_score();
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
void test2()
|
||||
{
|
||||
Alg_seq_ptr seq = make_simple_score();
|
||||
seq->convert_to_seconds();
|
||||
seq->get_time_map()->last_tempo = 120.0 / 60.0; // 120bpm
|
||||
seq->time_sig.insert(0, 3, 4);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
Alg_seq_ptr make_score()
|
||||
{
|
||||
Alg_seq_ptr seq = make_simple_score();
|
||||
// now we have notes at 0 and 0.8 seconds
|
||||
// add new ones at 1.2 and 1.8 seconds
|
||||
Alg_note_ptr note = seq->create_note(1.2, 0, 67, 67, 107, 0.6);
|
||||
seq->add_event(note, 0);
|
||||
|
||||
note = seq->create_note(1.8, 0, 69, 69, 109, 0.2);
|
||||
seq->add_event(note, 0);
|
||||
|
||||
// make the tempo such that notes start at 0, 1, 2, 3 beats
|
||||
seq->convert_to_seconds(); // hold time, change beats
|
||||
seq->get_time_map()->insert_beat(0.8, 1.0);
|
||||
seq->get_time_map()->insert_beat(1.2, 2.0);
|
||||
seq->get_time_map()->insert_beat(1.8, 3.0);
|
||||
seq->get_time_map()->insert_beat(2.0, 4.0);
|
||||
return seq;
|
||||
}
|
||||
|
||||
|
||||
void test3()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
// show the tempo map:
|
||||
seq->get_time_map()->show();
|
||||
|
||||
// write the sequence
|
||||
seq->write(cout, false); // in beats
|
||||
/* score should include
|
||||
63 @ m 0 = 0s
|
||||
65 @ m 0.25 = 0.8s
|
||||
67 @ m 0.5 = 1.2s
|
||||
69 @ m 0.75 = 1.8s
|
||||
*/
|
||||
seq->write(cout, true); // in seconds
|
||||
}
|
||||
|
||||
|
||||
void test4()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->write(cout, false);
|
||||
ofstream file("test4.mid", ios::out | ios::binary);
|
||||
if (!file) {
|
||||
printf("could not open test4.mid for writing");
|
||||
return;
|
||||
}
|
||||
seq->smf_write(file);
|
||||
file.close();
|
||||
delete seq;
|
||||
ifstream ifile("test4.mid", ios::binary | ios::in);
|
||||
if (ifile.fail()) {
|
||||
printf("could not open test4.mid for reading");
|
||||
return;
|
||||
}
|
||||
seq = new Alg_seq(ifile, true); // read midi file
|
||||
ifile.close();
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
void test5()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
ofstream file("test5.gro");
|
||||
if (file.is_open()) {
|
||||
printf("could not open test5.gro for writing");
|
||||
return;
|
||||
}
|
||||
seq->write(cout, true);
|
||||
seq->write(file, true);
|
||||
file.close();
|
||||
delete seq;
|
||||
ifstream ifile("test5.gro");
|
||||
if (ifile.fail()) {
|
||||
printf("could not open test5.gro for reading");
|
||||
return;
|
||||
}
|
||||
seq = new Alg_seq(ifile, false); // read midi file
|
||||
ifile.close();
|
||||
printf("SCORE AFTER READING\n");
|
||||
seq->write(cout, true);
|
||||
}
|
||||
|
||||
void test6()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->write(cout, true);
|
||||
long index = seq->seek_time(1.0, 0);
|
||||
printf("seq->get_units_are_seconds() = %d\n", seq->get_units_are_seconds());
|
||||
printf("seq->seek_time(1.0, 0) returns %ld\n", index);
|
||||
printf("note is:\n");
|
||||
if ((*seq->track(0))[index]->is_note()) {
|
||||
((Alg_note_ptr) (*(seq->track(0)))[index])->show();
|
||||
} else {
|
||||
printf("event is not a note\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
# test6()
|
||||
# should print
|
||||
# seq.units_are_seconds t
|
||||
# seq_time(1,0) returns 5
|
||||
# note is:
|
||||
# Alg_note: time 1.2, chan 0, dur 0.6, key 67, pitch 67, loud 107, attributes nil
|
||||
*/
|
||||
|
||||
void test7()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->write(cout, false);
|
||||
// insert time signature for one bar each of 4/4, 3/4, 5/4, 4/4 and
|
||||
// call quarter_to_measure() on various times
|
||||
seq->convert_to_beats(); // make sure we're talking beats
|
||||
seq->time_sig.insert(0, 4, 4);
|
||||
seq->time_sig.insert(4, 3, 4);
|
||||
seq->time_sig.insert(7, 5, 4);
|
||||
seq->time_sig.insert(12, 4, 4);
|
||||
double qtable[] = {0, 1, 3.999, 4, 4.001, 5, 7, 7.5, 12, 17, 17.25};
|
||||
for (int i = 0; i < 11; i++) {
|
||||
long m;
|
||||
double b, n, d;
|
||||
seq->beat_to_measure(qtable[i], &m, &b, &n, &d);
|
||||
printf("%g -> %ld + %g (%g/%g)\n", qtable[i], m, b, n, d);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
# test7()
|
||||
# should print:
|
||||
# 0 -> [0, 0, 4, 4]
|
||||
# 1 -> [0, 1, 4, 4]
|
||||
# 3.99999 -> [0, 3.99999, 4, 4]
|
||||
# 4 -> [1, 0, 3, 4]
|
||||
# 4.00001 -> [1, 1e-005, 3, 4]
|
||||
# 5 -> [1, 1, 3, 4]
|
||||
# 7 -> [2, 0, 5, 4]
|
||||
# 7.5 -> [2, 0.5, 5, 4]
|
||||
# 12 -> [3, 0, 4, 4]
|
||||
# 17 -> [4, 1, 4, 4]
|
||||
# 17.25 -> [4, 1.25, 4, 4]
|
||||
*/
|
||||
|
||||
void test8()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->write(cout, false);
|
||||
seq->get_time_map()->beats.len = 1;
|
||||
seq->get_time_map()->show();
|
||||
seq->write(cout, false);
|
||||
printf("insert 1 1 returns %d\n", seq->insert_beat(1.0, 1.0));
|
||||
seq->get_time_map()->show();
|
||||
printf("insert 5 3 returns %d\n", seq->insert_beat(5.0, 3.0));
|
||||
seq->get_time_map()->show();
|
||||
seq->write(cout, false);
|
||||
seq->write(cout, true);
|
||||
}
|
||||
|
||||
/*
|
||||
# should indicate notes starting at 0, .25, .5, and .75 whole notes,
|
||||
# and as seconds, starting at 0, 1, 3, and 5 seconds
|
||||
*/
|
||||
|
||||
void test9()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->write(cout, false);
|
||||
seq->get_time_map()->beats.len = 1;
|
||||
seq->get_time_map()->show();
|
||||
seq->write(cout, false);
|
||||
printf("insert 30 1 returns %d\n", seq->insert_tempo(30.0, 1.0));
|
||||
seq->get_time_map()->show();
|
||||
printf("insert 15 2 returns %d\n", seq->insert_tempo(15.0, 2.0));
|
||||
seq->get_time_map()->show();
|
||||
seq->write(cout, false);
|
||||
seq->write(cout, true);
|
||||
}
|
||||
|
||||
/*
|
||||
# show show
|
||||
# TW0.25 -tempor:30
|
||||
# TW0.5 -tempor:15
|
||||
# in the beat-based output, and beats at 0, 0.6, 2.6, 6.6 in the
|
||||
# time-based output
|
||||
*/
|
||||
|
||||
void test10()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->set_time_sig(0.0, 4, 4);
|
||||
seq->set_time_sig(4.0, 3, 4);
|
||||
seq->set_time_sig(7.0, 5, 4);
|
||||
seq->set_time_sig(12.0, 4, 4);
|
||||
double btable[] = { 0.0, 4.0, 7.0, 12.0 };
|
||||
for (int i = 0; i < 4; i++) {
|
||||
long m;
|
||||
double b, n, d;
|
||||
seq->beat_to_measure(btable[i], &m, &b, &n, &d);
|
||||
printf("%g -> %ld + %g (%g/%g)\n", btable[i], m, b, n, d);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
# result should show increasing measure numbers:
|
||||
#
|
||||
# [0, 0, 4, 4]
|
||||
# [1, 0, 3, 4]
|
||||
# [2, 0, 5, 4]
|
||||
# [3, 0, 4, 4]
|
||||
*/
|
||||
|
||||
void test11() // add track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->add_track(3);
|
||||
Alg_note_ptr note = seq->create_note(2.0, 0, 50, 50, 100, 1.0);
|
||||
seq->add_event(note, 3);
|
||||
seq->write(cout, false);
|
||||
seq->write(cout, true);
|
||||
}
|
||||
/*
|
||||
# should put note in track3 at beat TW0.5 (same as T1.2). Make sure
|
||||
# in the beat representation, note has duration Q1.
|
||||
*/
|
||||
|
||||
void test12() // test merge_tracks()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->add_track(3);
|
||||
Alg_note_ptr note = seq->create_note(2.0, 0, 50, 50, 100, 1.0);
|
||||
seq->add_event(note, 3);
|
||||
seq->write(cout, false);
|
||||
seq->merge_tracks();
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
# test12()
|
||||
#
|
||||
# tracks 1, 2, 3 go away, and the note that was in track 3 appears in track 0
|
||||
*/
|
||||
|
||||
void test13()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->write(cout, false);
|
||||
seq->set_tempo(120.0, 1, 3);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
# test13()
|
||||
#
|
||||
# tempo should be transformed to:
|
||||
#
|
||||
# TW0 -tempor:75
|
||||
# TW0.25 -tempor:120
|
||||
# TW0.75 -tempor:300
|
||||
# TW1 -tempor:100
|
||||
*/
|
||||
|
||||
void test14()
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->write(cout, false);
|
||||
seq->set_start_time((*(seq->track(0)))[3], 0.5);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test14()
|
||||
#
|
||||
# should place pitch 67 note at time TW0.125
|
||||
*/
|
||||
|
||||
void test15() // test copy() routine
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
Alg_event_ptr event = (*(seq->track(0)))[3];
|
||||
event->show();
|
||||
event = seq->copy_event(event);
|
||||
event->show();
|
||||
event = (*(seq->track(0)))[0];
|
||||
event->show();
|
||||
event = seq->copy_event(event);
|
||||
event->show();
|
||||
}
|
||||
|
||||
/*
|
||||
# test15()
|
||||
#
|
||||
# should print two identical notes, (orginal and a copy)
|
||||
# and two identical updates
|
||||
*/
|
||||
|
||||
void test16() // test cut_from_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->write(cout, false);
|
||||
Alg_track_ptr track = seq->cut_from_track(0, 2, 1, true);
|
||||
seq->track_list.append(track);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test16()
|
||||
#
|
||||
# should print original score and modified score
|
||||
# modified score has:
|
||||
# K63 at TW0
|
||||
# K65 at TW0.25
|
||||
# K69 at TW0.5
|
||||
# and on track 1 has
|
||||
# K67 at TW0
|
||||
*/
|
||||
|
||||
void test17() // test cut
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
seq->set_time_sig(0, 2, 4);
|
||||
seq->set_time_sig(2, 2, 8);
|
||||
seq->set_time_sig(3, 4, 4);
|
||||
seq->write(cout, false);
|
||||
Alg_seq_ptr new_seq = seq->cut(2, 1, true)->to_alg_seq();
|
||||
printf("after cut, original is\n");
|
||||
seq->write(cout, false);
|
||||
printf("after cut, new is\n");
|
||||
new_seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test17()
|
||||
#
|
||||
# should see seq with everything, then seq with
|
||||
# 2/4 at 0, 4/4 at TW0.5
|
||||
# and K63 at TW0, K65 at TW0.25, and K69 at TW0.5,
|
||||
# then in last seq,
|
||||
# 2/8 at 0, and K67 at 0
|
||||
*/
|
||||
|
||||
|
||||
void test18() // test copy_interval_from_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats(); // just to be sure
|
||||
Alg_track_ptr track = seq->track_list[0].copy(1, 2, false);
|
||||
seq->track_list.append(track);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
/*
|
||||
# test18()
|
||||
#
|
||||
# should see track 0 from beat 1 to 3, i.e.
|
||||
# K65 at T0, K67 at TW0.25
|
||||
*/
|
||||
|
||||
void test19() // test copy
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->set_time_sig(0, 2, 4);
|
||||
seq->set_time_sig(2, 2, 8);
|
||||
seq->set_time_sig(3, 4, 4);
|
||||
seq->set_tempo(120.0, 1, 3);
|
||||
seq->write(cout, false);
|
||||
printf("\n");
|
||||
Alg_seq_ptr new_seq = seq->copy(2, 1, true);
|
||||
printf("----------after cut, original---------\n");
|
||||
seq->write(cout, false);
|
||||
printf("----------after cut, new--------------\n");
|
||||
new_seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test19()
|
||||
#
|
||||
# should output original, original again (with no changes),
|
||||
# then a sequence with tempo 120 and k67 at TW0
|
||||
*/
|
||||
|
||||
void test20() // TEST 20 -- test track paste
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
Alg_track &track = *(seq->track(0)->copy(1, 2, false));
|
||||
printf("-------seq:---------\n");
|
||||
seq->write(cout, false);
|
||||
printf("-------track to paste ---------:\n");
|
||||
Alg_seq_ptr new_seq = new Alg_seq(track);
|
||||
new_seq->write(cout, false);
|
||||
seq->track(0)->paste(2, &track);
|
||||
printf("----------after paste, seq is:---------\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test20()
|
||||
#
|
||||
# final printed sequence should be quarter notes as follows:
|
||||
# K63, K65, K65, K67, K67, K69 (last at TW1.25)
|
||||
*/
|
||||
|
||||
void test21() // TEST 21 -- test paste
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->set_time_sig(0, 2, 4);
|
||||
seq->set_time_sig(2, 2, 8);
|
||||
seq->set_time_sig(3, 4, 4);
|
||||
seq->set_tempo(120.0, 1, 3);
|
||||
printf("-------seq original:---------\n");
|
||||
seq->write(cout, false);
|
||||
Alg_seq_ptr copy_buffer = seq->copy(1, 2, false);
|
||||
printf("-------what to paste:---------\n");
|
||||
copy_buffer->write(cout, false);
|
||||
seq->paste(2, copy_buffer);
|
||||
printf("-------after paste: ---------:\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test21()
|
||||
#
|
||||
# should print like in test20, but with tempo as follows:
|
||||
# TW0: 75
|
||||
# TW0.25: 120
|
||||
# TW0.5: 120
|
||||
# TW1: 120
|
||||
# TW1.25 300
|
||||
# TW1.5: 100
|
||||
# and the time signatures should be:
|
||||
# TW0: 2/4
|
||||
# TW0.5: 2/4
|
||||
# TW0.75: 2/8
|
||||
# TW1: 2/8
|
||||
# TW1.25: 4/4
|
||||
*/
|
||||
|
||||
void test22() // TEST 22 -- test merge_to_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
Alg_track_ptr track = seq->track(0)->copy(1, 2, false);
|
||||
printf("seq\n");
|
||||
seq->write(cout, false);
|
||||
printf("track:\n");
|
||||
Alg_seq_ptr new_seq = new Alg_seq(track);
|
||||
new_seq->write(cout, false);
|
||||
seq->merge(2, new_seq);
|
||||
printf("seq after merge\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
#test22()
|
||||
#
|
||||
# should output as follows:
|
||||
# 0 K63
|
||||
# 0.25 K65
|
||||
# 0.5 K67 and K65
|
||||
# 0.75 K69 and K67
|
||||
*/
|
||||
|
||||
|
||||
void test23() // test merge
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
Alg_track_ptr track = seq->track(0)->copy(1, 2, false);
|
||||
printf("seq:\n");
|
||||
seq->write(cout, false);
|
||||
printf("new_seq:\n");
|
||||
Alg_seq_ptr new_seq = new Alg_seq(track);
|
||||
new_seq->write(cout, false);
|
||||
seq->merge(2, new_seq);
|
||||
printf("seq after merge:\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test23()
|
||||
#
|
||||
# should output same as test22
|
||||
*/
|
||||
|
||||
void test24() // test silence_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->silence_track(0, 1, 2, true);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
#test24()
|
||||
#
|
||||
# should print two notes: K63 at T0 and K69 at TW0.75
|
||||
*/
|
||||
|
||||
void test25() // test silence_events
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
// copy everything from track 0
|
||||
Alg_track_ptr tr = seq->copy_track(0, 0, 10, false);
|
||||
// and make the new data be track 1
|
||||
seq->track_list.append(tr);
|
||||
seq->silence(1, 2, true);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
#test25()
|
||||
#
|
||||
# should print track 0 like test24, and track 1 like track 0
|
||||
*/
|
||||
|
||||
void test26() // test clear_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->clear_track(0, 1, 2, true);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
# test26()
|
||||
#
|
||||
# should print two notes: K63 at T0 and K69 at TW0.25
|
||||
*/
|
||||
|
||||
void test27() // test clear
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
// copy everything from track 0
|
||||
Alg_track_ptr track = seq->copy_track(0, 0, 10, false);
|
||||
// and make the new data be track 1
|
||||
seq->track_list.append(track);
|
||||
seq->clear(1, 2, true);
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
#
|
||||
# should print track 0 like test26, and track 1 like track 0
|
||||
*/
|
||||
|
||||
|
||||
void test28() // test insert_silence_in_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
printf("BEFORE:\n");
|
||||
seq->write(cout, false);
|
||||
seq->convert_to_beats();
|
||||
seq->insert_silence_in_track(0, 1, 2);
|
||||
printf("AFTER:\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
/*
|
||||
# test28()
|
||||
#
|
||||
# should print this:
|
||||
# TW0 K63
|
||||
# TW0.75 K65
|
||||
# TW1 K67
|
||||
# TW1.25 K69
|
||||
*/
|
||||
|
||||
void test29() // test insert_silence
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
seq->set_time_sig(0, 2, 4);
|
||||
seq->set_time_sig(2, 2, 8);
|
||||
printf("BEFORE:\n");
|
||||
seq->write(cout, false);
|
||||
seq->insert_silence(1, 2);
|
||||
printf("AFTER:\n");
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
# test29()
|
||||
#
|
||||
# should print
|
||||
# TW0 -tempor:75
|
||||
# TW0.25 -tempor:150
|
||||
# TW1 -tempor:100
|
||||
# TW1.25 -tempor:300
|
||||
# TW1.5 -tempor:100
|
||||
# TW0 ... (2/4 time) ...
|
||||
# TW1 ... (2/8 time) ...
|
||||
# TW0 V0 -attackr:0.007
|
||||
# TW0 V0 K63 P63 Q1 L105
|
||||
# TW0.75 V0 K65 P65 Q1 L107
|
||||
# TW1 V0 K67 P67 Q1 L107
|
||||
# TW1.25 V0 K69 P69 Q1 L109
|
||||
*/
|
||||
|
||||
void test30() // test find on a track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
Alg_event_list_ptr track = seq->track(0)->find(0, 2, false, 1 << 0,
|
||||
1 << ALG_NOTE);
|
||||
seq->track_list.append(new Alg_track(*track, seq->get_time_map(),
|
||||
seq->get_units_are_seconds()));
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
# test30()
|
||||
#
|
||||
# sets track 1 to TW0 K63, TW0.25 K65
|
||||
*/
|
||||
|
||||
|
||||
void test31() // test find_in_track
|
||||
{
|
||||
Alg_seq_ptr seq = make_score();
|
||||
seq->convert_to_beats();
|
||||
Alg_event_list_ptr track = seq->find_in_track(0, 0, 2, false, 1 << 0,
|
||||
1 << ALG_NOTE);
|
||||
seq->track_list.append(new Alg_track(*track, seq->get_time_map(),
|
||||
seq->get_units_are_seconds()));
|
||||
seq->write(cout, false);
|
||||
}
|
||||
|
||||
void test32() // serialize big midi file and unserialize
|
||||
{
|
||||
ifstream file("jsb-wtc-c-f.mid", ios::in | ios::binary);
|
||||
if (!file) {
|
||||
printf("Error: Could not open jsb-wtc-c-f.mid for reading\n");
|
||||
return;
|
||||
}
|
||||
Alg_seq_ptr seq = new Alg_seq(file, true); // read midi file
|
||||
file.close();
|
||||
|
||||
ofstream ofile("bigseq1.alg", ios::out | ios::binary);
|
||||
printf("after reading, real_dur is %g, beat_dur is %g\n",
|
||||
seq->get_real_dur(), seq->get_beat_dur());
|
||||
seq->write(ofile, true);
|
||||
ofile.close();
|
||||
|
||||
void *buffer;
|
||||
long bytes;
|
||||
seq->serialize(&buffer, &bytes);
|
||||
printf("Serialized %ld bytes\n", bytes);
|
||||
Alg_seq_ptr new_seq = (Alg_seq_ptr) seq->unserialize(buffer, bytes);
|
||||
ofstream sfile("bigseq2.alg", ios::out | ios::binary);
|
||||
new_seq->write(sfile, true);
|
||||
sfile.close();
|
||||
}
|
||||
|
||||
void test33() // cut and inspect some notes
|
||||
{
|
||||
ifstream file("be-ps-05.mid", ios::in | ios::binary);
|
||||
if (!file.is_open()) {
|
||||
printf("Error: Could not open be-ps-05.mid for reading\n");
|
||||
return;
|
||||
}
|
||||
Alg_seq_ptr seq = new Alg_seq(file, true); // read midi file
|
||||
file.close();
|
||||
seq->convert_to_seconds();
|
||||
|
||||
Alg_time_map_ptr tm = seq->get_time_map();
|
||||
printf("time map %p before\n", tm);
|
||||
// tm->show();
|
||||
printf("timestamp before %.15g\n", tm->beats[tm->locate_time(3.74)].time);
|
||||
ofstream ofile("before-33.alg", ios::out | ios::binary);
|
||||
seq->write(ofile, true);
|
||||
ofile.close();
|
||||
|
||||
Alg_seq_ptr cut = seq->cut(0.0, 3.0, false);
|
||||
|
||||
tm = seq->get_time_map();
|
||||
printf("timemap %p after\n", tm);
|
||||
// tm->show();
|
||||
printf("timestamp after %.15g\n", tm->beats[tm->locate_time(0.74)].time);
|
||||
ofile.open("after-33.alg", ios::out | ios::binary);
|
||||
seq->write(ofile, true);
|
||||
ofile.close();
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
test33();
|
||||
printf("Test 33 done, type return to exit\n");
|
||||
getchar();
|
||||
}
|
||||
199
lib-src/portsmf/portsmf_test/portsmf_test.vcproj
Normal file
199
lib-src/portsmf/portsmf_test/portsmf_test.vcproj
Normal file
@@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="portsmf_test"
|
||||
ProjectGUID="{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}"
|
||||
RootNamespace="allegro_test"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="0"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="../Debug/portsmf.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\portsmf_test.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
8
lib-src/portsmf/portsmf_test/scale.gro
Normal file
8
lib-src/portsmf/portsmf_test/scale.gro
Normal file
@@ -0,0 +1,8 @@
|
||||
TW0 C4 Q
|
||||
D4 Q
|
||||
E4 Q
|
||||
F4 Q
|
||||
G4 Q
|
||||
A4 Q
|
||||
B4 Q
|
||||
C5 Q
|
||||
22
lib-src/portsmf/portsmf_test/test.gro
Normal file
22
lib-src/portsmf/portsmf_test/test.gro
Normal file
@@ -0,0 +1,22 @@
|
||||
TW0 C4 Q
|
||||
D4 Q
|
||||
E4 Q
|
||||
F4 Q
|
||||
G4 Q
|
||||
A4 Q
|
||||
B4 Q
|
||||
C5 Q
|
||||
|
||||
|
||||
TQ1.5 E4 Q L0 -shapea:'rectangle' -y1r:60.0 -filll:false -linecolori:0 -linethicki:3
|
||||
TQ5.5 P64.1 Q L0 -shapea:'rectangle' -y1r:60.0 -filll:false -linecolori:0 -linethicki:3
|
||||
|
||||
TQ C4 W2 L0 -shapea:'line' -y1r:72.0 -linecolori:0 -linethicki:2
|
||||
|
||||
TH G4 U0.6 L0 -shapea:'triangle' -y1r:67.0 -x1r:1.8 -y2r:72.0 -linecolori:0 -linethicki:1 -filll:t
|
||||
|
||||
TQ3 B4 Q L0 -shapea:'oval' -y1r:60.0 -filll:false -linecolori:255 -linethicki:2
|
||||
|
||||
T0 G4 U1.0 L0 -shapea:'polygon' -x1r:0.8 -y1r:65.0 -x2r:1.0 -y2r:68 -x3r:0.9 -y3r:72.0 -x4r:0.2 -y4r:72.0 -filll:t
|
||||
|
||||
TW C4 L0 U0 -shapea:'text' -texts:"Hello World" -linecolori:128 -sizei:20 -justifys:"lc" -fonta:'modern' -weighta:'bold' -filll:t -fillcolori:65535
|
||||
11
lib-src/portsmf/portsmf_test/test2.gro
Normal file
11
lib-src/portsmf/portsmf_test/test2.gro
Normal file
@@ -0,0 +1,11 @@
|
||||
TW0 C4 Q
|
||||
D4 Q
|
||||
E4 Q
|
||||
F4 Q
|
||||
G4 Q
|
||||
A4 Q
|
||||
B4 Q
|
||||
C5 Q
|
||||
|
||||
|
||||
TQ5.5 P64.1 Q L0 -shapea:'rectangle' -y1r:60.0 -filll:false -linecolori:0 -linethicki:3
|
||||
10
lib-src/portsmf/portsmf_test/test5.gro
Normal file
10
lib-src/portsmf/portsmf_test/test5.gro
Normal file
@@ -0,0 +1,10 @@
|
||||
#track 0
|
||||
T0 -tempor:75
|
||||
T0.8 -tempor:150
|
||||
T1.2 -tempor:100
|
||||
T1.8 -tempor:300
|
||||
T0 V0 -attackr:0.007
|
||||
T0 V0 K63 P63 U0.8 L105
|
||||
T0.8 V0 K65 P65 U0.4 L107
|
||||
T1.2 V0 K67 P67 U0.6 L107
|
||||
T1.8 V0 K69 P69 U0.2 L109
|
||||
@@ -1,21 +0,0 @@
|
||||
--- audacity-src-1.3.6/lib-src/portsmf/allegrord.cpp-orig 2009-01-07 12:52:34.939330000 -0600
|
||||
+++ audacity-src-1.3.6/lib-src/portsmf/allegrord.cpp 2009-01-07 12:56:25.158766000 -0600
|
||||
@@ -262,7 +262,7 @@ bool Alg_reader::parse()
|
||||
parse_error(field, 0, "Dur specified twice");
|
||||
} else {
|
||||
// prepend 'U' to field, copy EOS too
|
||||
- field.insert(0, 1, 'U');
|
||||
+ field.insert((unsigned int)0, 1, 'U');
|
||||
dur = parse_dur(field, time);
|
||||
dur_flag = true;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ bool Alg_reader::parse()
|
||||
parse_error(field, 0, "Pitch specified twice");
|
||||
} else {
|
||||
// prepend 'P' to field
|
||||
- field.insert(0, 1, 'P');
|
||||
+ field.insert((unsigned int)0, 1, 'P');
|
||||
new_pitch = parse_pitch(field);
|
||||
new_pitch_flag = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user