You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(14) |
Dec
(33) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(68) |
Feb
(19) |
Mar
(6) |
Apr
(97) |
May
(15) |
Jun
(28) |
Jul
(83) |
Aug
(21) |
Sep
(67) |
Oct
(16) |
Nov
|
Dec
(22) |
| 2003 |
Jan
(47) |
Feb
(17) |
Mar
(5) |
Apr
|
May
(5) |
Jun
(106) |
Jul
(25) |
Aug
|
Sep
(14) |
Oct
(7) |
Nov
(24) |
Dec
(5) |
| 2004 |
Jan
(54) |
Feb
(19) |
Mar
|
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(153) |
Dec
(6) |
| 2005 |
Jan
(178) |
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(2) |
Feb
(173) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
(14) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(29) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(29) |
Feb
(3) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2013 |
Jan
(7) |
Feb
|
Mar
(18) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:27:27
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/alsa In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11882/src/classes/org/tritonus/midi/device/alsa Modified Files: AlsaMidiDevice.java Log Message: improved method and variable names; changed visibility Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/alsa/AlsaMidiDevice.java Index: AlsaMidiDevice.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/alsa/AlsaMidiDevice.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AlsaMidiDevice.java 18 Jan 2005 21:42:37 -0000 1.1 --- AlsaMidiDevice.java 13 Feb 2006 11:27:16 -0000 1.2 *************** *** 168,172 **** AlsaSeq.SND_SEQ_PORT_TYPE_APPLICATION, 0, 0, 0); ! if (getUseIn()) { /* --- 168,172 ---- AlsaSeq.SND_SEQ_PORT_TYPE_APPLICATION, 0, 0, 0); ! if (getUseTransmitter()) { /* *************** *** 187,191 **** m_alsaMidiIn.start(); } ! if (getUseOut()) { // uses subscribers, immediately --- 187,191 ---- m_alsaMidiIn.start(); } ! if (getUseReceiver()) { // uses subscribers, immediately *************** *** 205,209 **** { if (TDebug.TraceMidiDevice) { TDebug.out("AlsaMidiDevice.closeImpl(): begin"); } ! if (getUseIn()) { m_alsaMidiIn.interrupt(); --- 205,209 ---- { if (TDebug.TraceMidiDevice) { TDebug.out("AlsaMidiDevice.closeImpl(): begin"); } ! if (getUseTransmitter()) { m_alsaMidiIn.interrupt(); *************** *** 300,304 **** throws MidiUnavailableException { ! if (! getUseOut()) { throw new MidiUnavailableException("Receivers are not supported by this device"); --- 300,304 ---- throws MidiUnavailableException { ! if (! getUseReceiver()) { throw new MidiUnavailableException("Receivers are not supported by this device"); *************** *** 312,316 **** throws MidiUnavailableException { ! if (! getUseIn()) { throw new MidiUnavailableException("Transmitters are not supported by this device"); --- 312,316 ---- throws MidiUnavailableException { ! if (! getUseTransmitter()) { throw new MidiUnavailableException("Transmitters are not supported by this device"); |
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:27:27
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/midi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11882/src/classes/org/tritonus/share/midi Modified Files: TMidiDevice.java Log Message: improved method and variable names; changed visibility Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/share/midi/TMidiDevice.java Index: TMidiDevice.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/midi/TMidiDevice.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TMidiDevice.java 20 Jan 2005 07:47:16 -0000 1.1 --- TMidiDevice.java 13 Feb 2006 11:27:16 -0000 1.2 *************** *** 6,11 **** /* ! * Copyright (c) 1999, 2000 by Matthias Pfisterer ! * * * This program is free software; you can redistribute it and/or modify --- 6,10 ---- /* ! * Copyright (c) 1999 - 2006 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify *************** *** 60,75 **** /** A flag to store whether the device is "open". */ ! private boolean m_bOpen; - // TODO: rename to UseReceiver/UseTransmitter /** Whether to handle input from the physical port and to allow Transmitters. */ ! private boolean m_bUseIn; /** Whether to handle output to the physical port and to allow Receivers. */ ! private boolean m_bUseOut; /** The list of Receiver objects that belong to this --- 59,73 ---- /** A flag to store whether the device is "open". */ ! private boolean m_bDeviceOpen; /** Whether to handle input from the physical port and to allow Transmitters. */ ! private boolean m_bUseTransmitter; /** Whether to handle output to the physical port and to allow Receivers. */ ! private boolean m_bUseReceiver; /** The list of Receiver objects that belong to this *************** *** 113,123 **** */ public TMidiDevice(MidiDevice.Info info, ! boolean bUseIn, ! boolean bUseOut) { m_info = info; ! m_bUseIn = bUseIn; ! m_bUseOut = bUseOut; ! m_bOpen = false; m_receivers = new ArrayList<Receiver>(); m_transmitters = new ArrayList<Transmitter>(); --- 111,121 ---- */ public TMidiDevice(MidiDevice.Info info, ! boolean bUseTransmitter, ! boolean bUseReceiver) { m_info = info; ! m_bUseTransmitter = bUseTransmitter; ! m_bUseReceiver = bUseReceiver; ! m_bDeviceOpen = false; m_receivers = new ArrayList<Receiver>(); m_transmitters = new ArrayList<Transmitter>(); *************** *** 146,150 **** if (! isOpen()) { ! m_bOpen = true; openImpl(); } --- 144,148 ---- if (! isOpen()) { ! m_bDeviceOpen = true; openImpl(); } *************** *** 161,166 **** throws MidiUnavailableException { ! if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.openImpl(): begin"); } ! if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.openImpl(): end"); } } --- 159,164 ---- throws MidiUnavailableException { ! if (TDebug.TraceMidiDevice) TDebug.out("TMidiDevice.openImpl(): begin"); ! if (TDebug.TraceMidiDevice) TDebug.out("TMidiDevice.openImpl(): end"); } *************** *** 174,178 **** closeImpl(); // TODO: close all Receivers and Transmitters ! m_bOpen = false; } if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.close(): end"); } --- 172,176 ---- closeImpl(); // TODO: close all Receivers and Transmitters ! m_bDeviceOpen = false; } if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.close(): end"); } *************** *** 187,192 **** protected void closeImpl() { ! if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.closeImpl(): begin"); } ! if (TDebug.TraceMidiDevice) { TDebug.out("TMidiDevice.closeImpl(): end"); } } --- 185,190 ---- protected void closeImpl() { ! if (TDebug.TraceMidiDevice) TDebug.out("TMidiDevice.closeImpl(): begin"); ! if (TDebug.TraceMidiDevice) TDebug.out("TMidiDevice.closeImpl(): end"); } *************** *** 195,199 **** public boolean isOpen() { ! return m_bOpen; } --- 193,197 ---- public boolean isOpen() { ! return m_bDeviceOpen; } *************** *** 206,212 **** @see #getUseOut */ ! protected boolean getUseIn() { ! return m_bUseIn; } --- 204,210 ---- @see #getUseOut */ ! protected boolean getUseTransmitter() { ! return m_bUseTransmitter; } *************** *** 217,225 **** and output to them is passed to the physical port. ! @see #getUseIn */ ! protected boolean getUseOut() { ! return m_bUseOut; } --- 215,223 ---- and output to them is passed to the physical port. ! @see #getUseTransmitter */ ! protected boolean getUseReceiver() { ! return m_bUseReceiver; } *************** *** 241,245 **** { int nMaxReceivers = 0; ! if (getUseOut()) { /* --- 239,243 ---- { int nMaxReceivers = 0; ! if (getUseReceiver()) { /* *************** *** 256,260 **** { int nMaxTransmitters = 0; ! if (getUseIn()) { /* --- 254,258 ---- { int nMaxTransmitters = 0; ! if (getUseTransmitter()) { /* *************** *** 275,279 **** throws MidiUnavailableException { ! if (! getUseOut()) { throw new MidiUnavailableException("Receivers are not supported by this device"); --- 273,277 ---- throws MidiUnavailableException { ! if (! getUseReceiver()) { throw new MidiUnavailableException("Receivers are not supported by this device"); *************** *** 291,295 **** throws MidiUnavailableException { ! if (! getUseIn()) { throw new MidiUnavailableException("Transmitters are not supported by this device"); --- 289,293 ---- throws MidiUnavailableException { ! if (! getUseTransmitter()) { throw new MidiUnavailableException("Transmitters are not supported by this device"); *************** *** 324,328 **** ! private void addReceiver(Receiver receiver) { synchronized (m_receivers) --- 322,326 ---- ! protected void addReceiver(Receiver receiver) { synchronized (m_receivers) *************** *** 334,338 **** ! private void removeReceiver(Receiver receiver) { synchronized (m_receivers) --- 332,336 ---- ! protected void removeReceiver(Receiver receiver) { synchronized (m_receivers) *************** *** 345,349 **** ! private void addTransmitter(Transmitter transmitter) { synchronized (m_transmitters) --- 343,347 ---- ! protected void addTransmitter(Transmitter transmitter) { synchronized (m_transmitters) *************** *** 354,358 **** ! private void removeTransmitter(Transmitter transmitter) { synchronized (m_transmitters) --- 352,356 ---- ! protected void removeTransmitter(Transmitter transmitter) { synchronized (m_transmitters) |
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:25:07
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11089/src/classes/org/tritonus/midi/device/fluidsynth Modified Files: FluidSynthesizer.java Log Message: removed obsolete constructor Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java Index: FluidSynthesizer.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** FluidSynthesizer.java 12 Feb 2006 14:09:08 -0000 1.3 --- FluidSynthesizer.java 13 Feb 2006 11:24:54 -0000 1.4 *************** *** 53,57 **** private FluidSoundbank defaultSoundbank; ! private int defaultbankSfontID; // native pointers *32 bit*! --- 53,57 ---- private FluidSoundbank defaultSoundbank; ! private int defaultbankSfontID; // native pointers *32 bit*! *************** *** 96,111 **** - - /** - * Kept temporarily for compatibility. - */ - public FluidSynthesizer(MidiDevice.Info info, boolean bIn, boolean bOut) throws Exception - { - this(info); - } - - /** ! * should become the new main constructor. */ public FluidSynthesizer(MidiDevice.Info info) throws Exception --- 96,101 ---- /** ! * Constructor. */ public FluidSynthesizer(MidiDevice.Info info) throws Exception |
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:22:02
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/vorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10282/src/classes/org/tritonus/sampled/convert/vorbis Modified Files: VorbisFormatConversionProvider.java Log Message: fixed property handling; changed tracing code; reformatted Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/vorbis/VorbisFormatConversionProvider.java Index: VorbisFormatConversionProvider.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/vorbis/VorbisFormatConversionProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** VorbisFormatConversionProvider.java 16 Jan 2005 12:45:50 -0000 1.1 --- VorbisFormatConversionProvider.java 13 Feb 2006 11:21:50 -0000 1.2 *************** *** 203,214 **** // hacked together... // ... only works for PCM target encoding ... ! newTargetFormat = new AudioFormat(targetFormat.getEncoding(), ! sourceFormat.getSampleRate(), ! newTargetFormat.getSampleSizeInBits(), ! newTargetFormat.getChannels(), ! newTargetFormat.getFrameSize(), ! sourceFormat.getSampleRate(), ! newTargetFormat.isBigEndian()); ! if (TDebug.TraceAudioConverter) { TDebug.out("VorbisFormatConversionProvider.getDefaultTargetFormat(): really new target format: " + newTargetFormat); } return newTargetFormat; } --- 203,216 ---- // hacked together... // ... only works for PCM target encoding ... ! newTargetFormat = new AudioFormat( ! targetFormat.getEncoding(), ! sourceFormat.getSampleRate(), ! newTargetFormat.getSampleSizeInBits(), ! newTargetFormat.getChannels(), ! newTargetFormat.getFrameSize(), ! sourceFormat.getSampleRate(), ! newTargetFormat.isBigEndian(), ! targetFormat.properties()); ! if (TDebug.TraceAudioConverter) TDebug.out("VorbisFormatConversionProvider.getDefaultTargetFormat(): really new target format: " + newTargetFormat); return newTargetFormat; } *************** *** 254,258 **** AudioSystem.NOT_SPECIFIED, 262144, 16384); ! if (TDebug.TraceAudioConverter) { TDebug.out(">EncodedVorbisAudioInputStream.<init>(): begin"); } m_decodedStream = inputStream; m_abReadbuffer = new byte[READ * getFrameSize()]; --- 256,260 ---- AudioSystem.NOT_SPECIFIED, 262144, 16384); ! if (TDebug.TraceAudioConverter) TDebug.out(">EncodedVorbisAudioInputStream.<init>(): begin"); m_decodedStream = inputStream; m_abReadbuffer = new byte[READ * getFrameSize()]; *************** *** 264,267 **** --- 266,270 ---- { bUseVBR = ((Boolean) property).booleanValue(); + if (TDebug.TraceAudioConverter) TDebug.out("using VBR: " + bUseVBR); } *************** *** 271,292 **** { fQuality = ((Integer) property).intValue() / 10.0F; } - property = outputFormat.getProperty("bitrate"); int nNominalBitrate = DEFAULT_NOM_BITRATE; if (property instanceof Integer) { ! nNominalBitrate = ((Integer) property).intValue() / 1024; } property = outputFormat.getProperty("vorbis.min_bitrate"); - int nMinBitrate = DEFAULT_MIN_BITRATE; if (property instanceof Integer) { ! nMinBitrate = ((Integer) property).intValue() / 1024; } property = outputFormat.getProperty("vorbis.max_bitrate"); - int nMaxBitrate = DEFAULT_MAX_BITRATE; if (property instanceof Integer) { --- 274,301 ---- { fQuality = ((Integer) property).intValue() / 10.0F; + bUseVBR = true; + if (TDebug.TraceAudioConverter) TDebug.out("using quality (automatically switching VBR on): " + fQuality); } int nNominalBitrate = DEFAULT_NOM_BITRATE; + int nMinBitrate = DEFAULT_MIN_BITRATE; + int nMaxBitrate = DEFAULT_MAX_BITRATE; + property = outputFormat.getProperty("bitrate"); if (property instanceof Integer) { ! nNominalBitrate = ((Integer) property).intValue() /*/ 1024*/; ! nMinBitrate = nNominalBitrate; ! nMaxBitrate = nNominalBitrate; ! bUseVBR = false; ! if (TDebug.TraceAudioConverter) TDebug.out("using nominal bitrate (automatically switching VBR off): " + nNominalBitrate); } property = outputFormat.getProperty("vorbis.min_bitrate"); if (property instanceof Integer) { ! nMinBitrate = ((Integer) property).intValue() /*/ 1024*/; } property = outputFormat.getProperty("vorbis.max_bitrate"); if (property instanceof Integer) { *************** *** 306,313 **** int nSampleRate = (int) inputStream.getFormat().getSampleRate(); ! if (TDebug.TraceAudioConverter) { TDebug.out("sample rate: " + nSampleRate); } ! if (TDebug.TraceAudioConverter) { TDebug.out("channels: " + getChannels()); } if (bUseVBR) { m_info.encodeInitVBR(getChannels(), nSampleRate, --- 315,323 ---- int nSampleRate = (int) inputStream.getFormat().getSampleRate(); ! if (TDebug.TraceAudioConverter) TDebug.out("sample rate: " + nSampleRate); ! if (TDebug.TraceAudioConverter) TDebug.out("channels: " + getChannels()); if (bUseVBR) { + if (TDebug.TraceAudioConverter) TDebug.out("using VBR with quality: " + fQuality); m_info.encodeInitVBR(getChannels(), nSampleRate, *************** *** 316,319 **** --- 326,330 ---- else { + if (TDebug.TraceAudioConverter) TDebug.out("using fixed bitrate(max/nom/min): " + nMaxBitrate + "/" + nNominalBitrate + "/" + nMinBitrate); m_info.encodeInit(getChannels(), nSampleRate, |
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:19:39
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9473/src/classes/org/tritonus/lowlevel/pogg Modified Files: Page.java Log Message: reformatted; updated documentation; removed free() method Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Page.java Index: Page.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Page.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Page.java 5 Feb 2005 21:07:34 -0000 1.3 --- Page.java 13 Feb 2006 11:19:32 -0000 1.4 *************** *** 39,106 **** private static final int[] crc_lookup = { ! 0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9, ! 0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005, ! 0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61, ! 0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd, ! 0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9, ! 0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75, ! 0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011, ! 0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd, ! 0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039, ! 0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5, ! 0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81, ! 0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d, ! 0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49, ! 0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95, ! 0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1, ! 0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d, ! 0x34867077,0x30476dc0,0x3d044b19,0x39c556ae, ! 0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072, ! 0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16, ! 0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca, ! 0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde, ! 0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02, ! 0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066, ! 0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba, ! 0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e, ! 0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692, ! 0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6, ! 0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a, ! 0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e, ! 0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2, ! 0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686, ! 0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a, ! 0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637, ! 0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb, ! 0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f, ! 0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53, ! 0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47, ! 0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b, ! 0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff, ! 0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623, ! 0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7, ! 0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b, ! 0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f, ! 0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3, ! 0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7, ! 0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b, ! 0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f, ! 0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3, ! 0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640, ! 0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c, ! 0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8, ! 0x68860bfd,0x6c47164a,0x61043093,0x65c52d24, ! 0x119b4be9,0x155a565e,0x18197087,0x1cd86d30, ! 0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec, ! 0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088, ! 0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654, ! 0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0, ! 0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c, ! 0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18, ! 0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4, ! 0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0, ! 0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c, ! 0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668, ! 0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4 }; --- 39,106 ---- private static final int[] crc_lookup = { ! 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, ! 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, ! 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, ! 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, ! 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, ! 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, ! 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, ! 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, ! 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, ! 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, ! 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, ! 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, ! 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, ! 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, ! 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, ! 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, ! 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, ! 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, ! 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, ! 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, ! 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, ! 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, ! 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, ! 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, ! 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, ! 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, ! 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, ! 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, ! 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, ! 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, ! 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, ! 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, ! 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, ! 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, ! 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, ! 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, ! 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, ! 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, ! 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, ! 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, ! 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, ! 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, ! 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, ! 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, ! 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, ! 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, ! 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, ! 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, ! 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, ! 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, ! 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, ! 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, ! 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, ! 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, ! 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, ! 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, ! 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, ! 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, ! 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, ! 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, ! 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, ! 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, ! 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, ! 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 }; *************** *** 114,132 **** public Page() { - if (TDebug.TraceOggNative) { TDebug.out("Page.<init>(): begin"); } - if (TDebug.TraceOggNative) { TDebug.out("Page.<init>(): end"); } } ! private native int malloc(); ! // TODO: remove calls to this method ! public void free() ! { ! } ! ! ! /** Calls ogg_page_version(). */ public int getVersion() --- 114,126 ---- public Page() { } ! /** Obtains the stream structure version. This method returns the ! stream structure version this page is encoded in. For the ! current ogg version, this is always zero. ! @return the stream structure version */ public int getVersion() *************** *** 136,140 **** ! /** Calls ogg_page_continued(). */ public boolean isContinued() --- 130,138 ---- ! /** Returns if the page is continued. ! This method returns whether this page starts with a packet that is ! continued from the previous page. ! ! @return true if the page starts with a continued packet. */ public boolean isContinued() *************** *** 175,179 **** ! /** Calls ogg_page_bos(). */ public boolean isBos() --- 173,182 ---- ! /** Returns the "begin of stream" property of the page. This ! method returns true if the page is the first page of the ! stream. ! ! @return true if the page is the first in the stream, false ! otherwise */ public boolean isBos() *************** *** 184,188 **** ! /** Calls ogg_page_eos(). */ public boolean isEos() --- 187,195 ---- ! /** Returns the "end of stream" property of the page. This method ! returns true if the page is the last page of the stream. ! ! @return true if the page is the last in the stream, false ! otherwise */ public boolean isEos() *************** *** 193,197 **** ! /** Calls ogg_page_granulepos(). */ public long getGranulePos() --- 200,208 ---- ! /** Obtains the granule position property of the page. This ! method returns the granule position of the page as stored in ! the page header. ! ! @return the granule position of the page */ public long getGranulePos() *************** *** 210,214 **** ! /** Calls ogg_page_serialno(). */ public int getSerialNo() --- 221,229 ---- ! /** Obtain the serial number of the stream the page belongs to. ! This method returns the stream serial number stored in the ! page header. ! ! @return the stream serial number */ public int getSerialNo() *************** *** 234,238 **** ! /** Calls ogg_page_checksum_set(). */ public void setChecksum() --- 249,253 ---- ! /** Calculate and set the checksum of the page. */ public void setChecksum() *************** *** 241,248 **** /* safety; needed for API behavior, but not framing code */ ! m_abHeader[22]=0; ! m_abHeader[23]=0; ! m_abHeader[24]=0; ! m_abHeader[25]=0; for(int i = 0; i < m_nHeaderLength; i++) --- 256,263 ---- /* safety; needed for API behavior, but not framing code */ ! m_abHeader[22] = 0; ! m_abHeader[23] = 0; ! m_abHeader[24] = 0; ! m_abHeader[25] = 0; for(int i = 0; i < m_nHeaderLength; i++) *************** *** 259,263 **** ! public byte[] getHeader() { --- 274,279 ---- ! /** Obtain the header of the page. ! */ public byte[] getHeader() { *************** *** 268,272 **** --- 284,291 ---- + /** Obtain the body of the page. + + */ public byte[] getBody() { |
|
From: Matthias P. <pfi...@us...> - 2006-02-13 11:12:43
|
Update of /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7203/org/tritonus/test/tritonus/lowlevel/pogg Modified Files: FramingTestCase.java PacketTestCase.java Log Message: adapted to changed interface Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg/FramingTestCase.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg/PacketTestCase.java Index: FramingTestCase.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg/FramingTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FramingTestCase.java 2 Feb 2005 21:39:31 -0000 1.1 --- FramingTestCase.java 13 Feb 2006 11:12:25 -0000 1.2 *************** *** 390,395 **** System.arraycopy(abPacketData, 0, data, inptr, len); inptr += len; ! op.setData(abPacketData, len); ! op.setFlags(false, i + 1 == packets, granule_pos); granule_pos += 1024; --- 390,395 ---- System.arraycopy(abPacketData, 0, data, inptr, len); inptr += len; ! op.setData(abPacketData, 0, len); ! op.setFlags(false, i + 1 == packets, granule_pos, 0); granule_pos += 1024; *************** *** 638,643 **** abPacketData[j]= (byte) (i + j); } ! op.setData(abPacketData, len); ! op.setFlags(false, i + 1 == pl.length, (i + 1) * 1000); os_en.packetIn(op); --- 638,643 ---- abPacketData[j]= (byte) (i + j); } ! op.setData(abPacketData, 0, len); ! op.setFlags(false, i + 1 == pl.length, (i + 1) * 1000, 0); os_en.packetIn(op); Index: PacketTestCase.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg/PacketTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** PacketTestCase.java 2 Feb 2005 21:39:31 -0000 1.1 --- PacketTestCase.java 13 Feb 2006 11:12:25 -0000 1.2 *************** *** 59,64 **** { Packet p = new Packet(); ! p.setData(new byte[3], 3); ! p.setFlags(true, true, 99); p.clear(); checkPacket(p, "clear test", false, false, 0, 0, null); --- 59,64 ---- { Packet p = new Packet(); ! p.setData(new byte[3], 0, 3); ! p.setFlags(true, true, 99, 100); p.clear(); checkPacket(p, "clear test", false, false, 0, 0, null); *************** *** 76,80 **** abData[i] = (byte) i; } ! p.setData(abData, abData.length); checkPacket(p, "set data test", false, false, 0, 0, abData); } --- 76,80 ---- abData[i] = (byte) i; } ! p.setData(abData, 0, abData.length); checkPacket(p, "set data test", false, false, 0, 0, abData); } *************** *** 91,95 **** abData[i] = (byte) i; } ! p.setData(abData, abData.length / 2); byte[] abCompare = new byte[abData.length / 2]; System.arraycopy(abData, 0, abCompare, 0, abData.length / 2); --- 91,95 ---- abData[i] = (byte) i; } ! p.setData(abData, 0, abData.length / 2); byte[] abCompare = new byte[abData.length / 2]; System.arraycopy(abData, 0, abCompare, 0, abData.length / 2); *************** *** 102,109 **** throws Exception { ! checkFlags("set flags test 1", true, false, 65555L); ! checkFlags("set flags test 2", false, true, 0); ! checkFlags("set flags test 3", false, false, Long.MAX_VALUE); ! checkFlags("set flags test 4", true, true, Long.MIN_VALUE); } --- 102,109 ---- throws Exception { ! checkFlags("set flags test 1", true, false, 65555L, 0); ! checkFlags("set flags test 2", false, true, 0, 0); ! checkFlags("set flags test 3", false, false, Long.MAX_VALUE, 0); ! checkFlags("set flags test 4", true, true, Long.MIN_VALUE, 0); } *************** *** 111,122 **** private void checkFlags(String strMessage, boolean bBos, boolean bEos, ! long lGranulePos) throws Exception { Packet p = new Packet(); byte[] abData = new byte[0]; ! p.setData(abData, abData.length); ! p.setFlags(bBos, bEos, lGranulePos); ! checkPacket(p, strMessage, bBos, bEos, lGranulePos, 0, abData); } --- 111,122 ---- private void checkFlags(String strMessage, boolean bBos, boolean bEos, ! long lGranulePos, long lPacketNo) throws Exception { Packet p = new Packet(); byte[] abData = new byte[0]; ! p.setData(abData, 0, abData.length); ! p.setFlags(bBos, bEos, lGranulePos, lPacketNo); ! checkPacket(p, strMessage, bBos, bEos, lGranulePos, lPacketNo, abData); } |
|
From: Henri M. <hfm...@us...> - 2006-02-12 18:55:55
|
Update of /cvsroot/tritonus/tritonus/src/lib/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12283 Modified Files: debug.h Log Message: Visual C++ didn't support variadic macros until Visual Studio 2005 Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/common/debug.h Index: debug.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/common/debug.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** debug.h 12 Feb 2006 13:57:45 -0000 1.3 --- debug.h 12 Feb 2006 18:55:47 -0000 1.4 *************** *** 30,36 **** #define TRUE 1 #define out(...) if (debug_flag) { fprintf(debug_file, __VA_ARGS__); \ fflush(debug_file); } ! static int debug_flag = FALSE; static FILE* debug_file = NULL; --- 30,43 ---- #define TRUE 1 + #ifndef _MSC_VER + #define VARIADIC_MACROS + #elif _MSC_VER >= 1400 + #define VARIADIC_MACROS + #endif + + #ifdef VARIADIC_MACROS #define out(...) if (debug_flag) { fprintf(debug_file, __VA_ARGS__); \ fflush(debug_file); } ! #endif static int debug_flag = FALSE; static FILE* debug_file = NULL; |
|
From: Henri M. <hfm...@us...> - 2006-02-12 18:55:05
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11573 Modified Files: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Log Message: Visual C++ didn't support variadic macros until Visual Studio 2005 Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Index: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 12 Feb 2006 14:09:10 -0000 1.5 --- org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 12 Feb 2006 18:54:54 -0000 1.6 *************** *** 168,172 **** --- 168,180 ---- fluid_synth_t* synth = get_synth(env, obj); + #ifdef VARIADIC_MACROS out("synth: %p, values: %d %d %d %d\n", synth, command, channel, data1, data2); + #else + if (debug_flag) + { + fprintf(debug_file, "synth: %p, values: %d %d %d %d\n", synth, command, channel, data1, data2); + fflush(debug_file); + } + #endif fflush(stdout); event = new_fluid_midi_event(); |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 14:09:18
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11615/src/lib/fluidsynth Modified Files: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Log Message: changed to tritonus style debug messages Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Index: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 11 Feb 2006 20:50:36 -0000 1.4 --- org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 12 Feb 2006 14:09:10 -0000 1.5 *************** *** 7,10 **** --- 7,11 ---- /* * Copyright (c) 2006 by Henri Manson + * Copyright (c) 2006 by Matthias Pfisterer * All rights reserved. * *************** *** 42,45 **** --- 43,48 ---- #include "org_tritonus_midi_device_fluidsynth_FluidSynthesizer.h" #include "org_tritonus_midi_sb_fluidsynth_FluidSoundbank.h" + #include "../common/common.h" + #include "../common/debug.h" *************** *** 165,169 **** fluid_synth_t* synth = get_synth(env, obj); ! printf("synth: %x, values: %d %d %d %d\n", synth, command, channel, data1, data2); fflush(stdout); event = new_fluid_midi_event(); --- 168,172 ---- fluid_synth_t* synth = get_synth(env, obj); ! out("synth: %p, values: %d %d %d %d\n", synth, command, channel, data1, data2); fflush(stdout); event = new_fluid_midi_event(); *************** *** 353,360 **** else { ! return -99; } } /* org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c */ --- 356,375 ---- else { ! return -1; } } + /* + * Class: org_tritonus_midi_device_fluidsynth_FluidSynthesizer + * Method: setTrace + * Signature: (Z)V + */ + JNIEXPORT void JNICALL Java_org_tritonus_midi_device_fluidsynth_FluidSynthesizer_setTrace + (JNIEnv *env, jclass cls, jboolean bTrace) + { + debug_flag = bTrace; + debug_file = stderr; + } + /* org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c */ |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 14:09:18
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11615/src/classes/org/tritonus/midi/device/fluidsynth Modified Files: FluidSynthesizer.java Log Message: changed to tritonus style debug messages Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java Index: FluidSynthesizer.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** FluidSynthesizer.java 11 Feb 2006 20:47:42 -0000 1.2 --- FluidSynthesizer.java 12 Feb 2006 14:09:08 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /* * Copyright (c) 2006 by Henri Manson + * Copyright (c) 2006 by Matthias Pfisterer * All rights reserved. * *************** *** 40,43 **** --- 41,45 ---- import javax.sound.midi.*; + import org.tritonus.share.TDebug; import org.tritonus.share.midi.TMidiDevice; import org.tritonus.midi.sb.fluidsynth.FluidSoundbank; *************** *** 48,56 **** public class FluidSynthesizer extends TMidiDevice implements Synthesizer { - static { - System.loadLibrary("tritonusfluid"); - } - - private MidiChannel channels[]; private FluidSoundbank defaultSoundbank; --- 50,53 ---- *************** *** 64,67 **** --- 61,100 ---- + + static + { + loadNativeLibrary(); + } + + + /** Load the native library for fluidsynth. + */ + private static void loadNativeLibrary() + { + if (TDebug.TraceFluidNative) TDebug.out("FluidSynthesizer.loadNativeLibrary(): loading native library tritonusfluid"); + try + { + System.loadLibrary("tritonusfluid"); + // only reached if no exception occures + if (TDebug.TraceFluidNative) + { + setTrace(true); + } + } + catch (Error e) + { + if (TDebug.TraceFluidNative || + TDebug.TraceAllExceptions) + { + TDebug.out(e); + } + // throw e; + } + if (TDebug.TraceFluidNative) TDebug.out("FluidSynthesizer.loadNativeLibrary(): loaded"); + } + + + + /** * Kept temporarily for compatibility. *************** *** 82,86 **** throw new Exception("Low-level initialization of the synthesizer failed"); } ! System.out.println("FluidSynthesizer: " + Integer.toHexString(synthPtr)); try { --- 115,119 ---- throw new Exception("Low-level initialization of the synthesizer failed"); } ! if (TDebug.TraceSynthesizer) TDebug.out("FluidSynthesizer: " + Integer.toHexString(synthPtr)); try { *************** *** 104,108 **** protected void finalize(){ ! System.out.println("finalize: " + Integer.toHexString(synthPtr)); deleteSynth(); } --- 137,141 ---- protected void finalize(){ ! if (TDebug.TraceSynthesizer) TDebug.out("finalize: " + Integer.toHexString(synthPtr)); deleteSynth(); } *************** *** 111,115 **** public void close() { ! System.out.println("close: " + Integer.toHexString(synthPtr)); deleteSynth(); super.close(); --- 144,148 ---- public void close() { ! if (TDebug.TraceSynthesizer) TDebug.out("close: " + Integer.toHexString(synthPtr)); deleteSynth(); super.close(); *************** *** 134,138 **** public native void setBankOffset(int sfontID, int offset); public native void setGain(float gain); ! /* $$mp: currently not functional because fluid_synth_set_reverb_preset() is not present in fluidsynth 1.0.6 */ --- 167,172 ---- public native void setBankOffset(int sfontID, int offset); public native void setGain(float gain); ! ! /* $$mp: currently not functional because fluid_synth_set_reverb_preset() is not present in fluidsynth 1.0.6 */ *************** *** 144,147 **** --- 178,189 ---- protected native void deleteSynth(); + /** Sets tracing in the native code. + * Note that this method can either be called directly or (recommended) + * the system property "tritonus.TraceFluidNative" can be set to true. + * + * @see org.tritonus.share.TDebug + */ + public static native void setTrace(boolean bTrace); + public boolean isSoundbankSupported(Soundbank soundbank) { |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 14:08:01
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11057/src/classes/org/tritonus/share Modified Files: TDebug.java Log Message: added debugging properties Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/share/TDebug.java Index: TDebug.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/share/TDebug.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TDebug.java 20 Jan 2005 07:47:16 -0000 1.1 --- TDebug.java 12 Feb 2006 14:07:48 -0000 1.2 *************** *** 86,89 **** --- 86,90 ---- public static boolean TraceMidiDeviceProvider = getBooleanProperty("TraceMidiDeviceProvider"); public static boolean TraceSequencer = getBooleanProperty("TraceSequencer"); + public static boolean TraceSynthesizer = getBooleanProperty("TraceSynthesizer"); public static boolean TraceMidiDevice = getBooleanProperty("TraceMidiDevice"); *************** *** 97,100 **** --- 98,103 ---- public static boolean TraceAlsaMidiChannel = getBooleanProperty("TraceAlsaMidiChannel"); + public static boolean TraceFluidNative = getBooleanProperty("TraceFluidNative"); + // misc public static boolean TraceAlsaCtlNative = getBooleanProperty("TraceAlsaCtlNative"); |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 14:05:22
|
Update of /cvsroot/tritonus/tritonus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10308 Modified Files: .cvsignore Log Message: updated Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/.cvsignore Index: .cvsignore =================================================================== RCS file: /cvsroot/tritonus/tritonus/.cvsignore,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** .cvsignore 29 Jan 2003 15:38:47 -0000 1.9 --- .cvsignore 12 Feb 2006 14:05:09 -0000 1.10 *************** *** 12,13 **** --- 12,14 ---- tritonus-*.tar.gz project.dtd + aclocal.m4 |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 13:57:52
|
Update of /cvsroot/tritonus/tritonus/src/lib/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7007/src/lib/common Modified Files: debug.h Log Message: added macro Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/common/debug.h Index: debug.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/common/debug.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** debug.h 13 Dec 2002 10:29:52 -0000 1.2 --- debug.h 12 Feb 2006 13:57:45 -0000 1.3 *************** *** 4,8 **** /* ! * Copyright (c) 1999 - 2001 by Matthias Pfisterer <Mat...@gm...> * * This program is free software; you can redistribute it and/or modify --- 4,8 ---- /* ! * Copyright (c) 1999 - 2006 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify *************** *** 30,33 **** --- 30,35 ---- #define TRUE 1 + #define out(...) if (debug_flag) { fprintf(debug_file, __VA_ARGS__); \ + fflush(debug_file); } static int debug_flag = FALSE; |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 08:56:40
|
Update of /cvsroot/tritonus/tritonus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14686 Modified Files: configure.in Log Message: added test for libtool Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/configure.in Index: configure.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/configure.in,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** configure.in 7 Feb 2006 20:42:00 -0000 1.32 --- configure.in 12 Feb 2006 08:56:32 -0000 1.33 *************** *** 117,120 **** --- 117,122 ---- AC_PROG_INSTALL AC_PROG_LN_S + AC_DISABLE_STATIC + AC_PROG_LIBTOOL AC_SUBST(SUBDIRS) |
|
From: Matthias P. <pfi...@us...> - 2006-02-12 08:55:48
|
Update of /cvsroot/tritonus/tritonus/src/lib/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14391/src/lib/common Modified Files: .cvsignore Log Message: updated Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/common/.cvsignore Index: .cvsignore =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/common/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** .cvsignore 4 Apr 2002 00:28:05 -0000 1.1 --- .cvsignore 12 Feb 2006 08:55:37 -0000 1.2 *************** *** 2,4 **** *.o *.so* ! --- 2,6 ---- *.o *.so* ! *.lo ! *.la ! .libs |
|
From: Henri M. <hfm...@us...> - 2006-02-11 20:51:42
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/sb/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27981 Modified Files: FluidSoundbank.java Log Message: Multiple FluidSynth instances Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/sb/fluidsynth/FluidSoundbank.java Index: FluidSoundbank.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/sb/fluidsynth/FluidSoundbank.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FluidSoundbank.java 7 Feb 2006 13:30:17 -0000 1.1 --- FluidSoundbank.java 11 Feb 2006 20:51:33 -0000 1.2 *************** *** 41,44 **** --- 41,45 ---- import javax.sound.midi.*; import org.tritonus.share.TDebug; + import org.tritonus.midi.device.fluidsynth.FluidSynthesizer; /** *************** *** 48,51 **** --- 49,53 ---- public class FluidSoundbank implements Soundbank { + private FluidSynthesizer synth; private int sfontID; private FluidInstrument[] instruments; *************** *** 66,71 **** ! public FluidSoundbank(int sfontID) { this.sfontID = sfontID; //TDebug.out("1"); --- 68,74 ---- ! public FluidSoundbank(FluidSynthesizer synth, int sfontID) { + this.synth = synth; this.sfontID = sfontID; //TDebug.out("1"); |
|
From: Henri M. <hfm...@us...> - 2006-02-11 20:50:45
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27730 Modified Files: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Log Message: Multiple FluidSynth instances Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Index: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 9 Feb 2006 23:10:29 -0000 1.3 --- org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 11 Feb 2006 20:50:36 -0000 1.4 *************** *** 47,98 **** ! static fluid_settings_t* _settings = 0; ! static fluid_synth_t* _synth = 0; ! static fluid_audio_driver_t* _adriver = 0; ! static void fluid_jni_delete_synth(); ! ! ! ! static int fluid_jni_new_synth() { ! if (_synth == 0) { ! _settings = new_fluid_settings(); ! if (_settings == 0) { ! goto error_recovery; ! } ! ! _synth = new_fluid_synth(_settings); ! if (_synth == 0) { ! goto error_recovery; ! } ! ! _adriver = new_fluid_audio_driver(_settings, _synth); ! if (_adriver == 0) { ! goto error_recovery; ! } } return 0; - - error_recovery: - fluid_jni_delete_synth(); - return -1; } ! static void fluid_jni_delete_synth() { ! if (_adriver) { ! delete_fluid_audio_driver(_adriver); ! _adriver = 0; ! } ! if (_synth) { ! delete_fluid_synth(_synth); ! _synth = 0; ! } ! if (_settings) { ! delete_fluid_settings(_settings); ! _settings = 0; } } --- 47,92 ---- ! static jclass fluidsynthclass; ! static jfieldID settingsPtrFieldID; ! static jfieldID synthPtrFieldID; ! static jfieldID audioDriverPtrFieldID; ! static int get_fluidclassinfo(JNIEnv *env) { ! if (fluidsynthclass == NULL) { ! fluidsynthclass = (*env)->FindClass(env, "org/tritonus/midi/device/fluidsynth/FluidSynthesizer"); ! if (!fluidsynthclass) ! return -1; ! synthPtrFieldID = (*env)->GetFieldID(env, fluidsynthclass, "synthPtr", "I"); ! settingsPtrFieldID = (*env)->GetFieldID(env, fluidsynthclass, "settingsPtr", "I"); ! audioDriverPtrFieldID = (*env)->GetFieldID(env, fluidsynthclass, "audioDriverPtr", "I"); } return 0; } + static fluid_synth_t* get_synth(JNIEnv *env, jobject obj) + { + get_fluidclassinfo(env); + return (fluid_synth_t*) (*env)->GetIntField(env, obj, synthPtrFieldID); + } ! static void fluid_jni_delete_synth(JNIEnv *env, jobject obj, fluid_settings_t* settings, fluid_synth_t* synth, fluid_audio_driver_t* adriver) { ! get_fluidclassinfo(env); ! if (adriver) ! { ! delete_fluid_audio_driver(adriver); ! (*env)->SetIntField(env, obj, audioDriverPtrFieldID, 0); ! } ! if (synth) ! { ! delete_fluid_synth(synth); ! (*env)->SetIntField(env, obj, synthPtrFieldID, 0); ! } ! if (settings) ! { ! delete_fluid_settings(settings); ! (*env)->SetIntField(env, obj, settingsPtrFieldID, (int) 0); } } *************** *** 100,105 **** - - /* * Class: org_tritonus_midi_device_fluidsynth_FluidSynthesizer --- 94,97 ---- *************** *** 110,114 **** (JNIEnv *env, jobject obj) { ! return fluid_jni_new_synth(); } --- 102,135 ---- (JNIEnv *env, jobject obj) { ! fluid_synth_t* synth = NULL; ! fluid_settings_t* settings = NULL; ! fluid_audio_driver_t* adriver = NULL; ! ! synth = get_synth(env, obj); ! if (synth == 0) ! { ! settings = new_fluid_settings(); ! if (settings == 0) { ! goto error_recovery; ! } ! ! synth = new_fluid_synth(settings); ! if (synth == 0) { ! goto error_recovery; ! } ! ! adriver = new_fluid_audio_driver(settings, synth); ! if (adriver == 0) { ! goto error_recovery; ! } ! (*env)->SetIntField(env, obj, settingsPtrFieldID, (int) settings); ! (*env)->SetIntField(env, obj, synthPtrFieldID, (int) synth); ! (*env)->SetIntField(env, obj, audioDriverPtrFieldID, (int) adriver); ! } ! return 0; ! ! error_recovery: ! fluid_jni_delete_synth(env, obj, settings, synth, adriver); ! return -1; } *************** *** 122,126 **** (JNIEnv *env, jobject obj) { ! fluid_jni_delete_synth(); } --- 143,154 ---- (JNIEnv *env, jobject obj) { ! fluid_synth_t* synth; ! fluid_settings_t* settings; ! fluid_audio_driver_t* adriver; ! ! synth = get_synth(env, obj); ! settings = (fluid_settings_t*) (*env)->GetIntField(env, obj, settingsPtrFieldID); ! adriver = (fluid_audio_driver_t*) (*env)->GetIntField(env, obj, audioDriverPtrFieldID); ! fluid_jni_delete_synth(env, obj, settings, synth, adriver); } *************** *** 135,141 **** { fluid_midi_event_t* event; ! //printf("values: %d %d %d %d\n", command, channel, data1, data2); ! //printf("1"); fflush(stdout); event = new_fluid_midi_event(); if (!event) --- 163,170 ---- { fluid_midi_event_t* event; + fluid_synth_t* synth = get_synth(env, obj); ! printf("synth: %x, values: %d %d %d %d\n", synth, command, channel, data1, data2); ! fflush(stdout); event = new_fluid_midi_event(); if (!event) *************** *** 157,161 **** fflush(stdout); */ ! fluid_synth_handle_midi_event(_synth, event); //printf("4"); fflush(stdout); delete_fluid_midi_event(event); --- 186,190 ---- fflush(stdout); */ ! fluid_synth_handle_midi_event(synth, event); //printf("4"); fflush(stdout); delete_fluid_midi_event(event); *************** *** 174,178 **** const char *cfilename = (*env)->GetStringUTFChars(env, filename, 0); int sfont_id; ! if (_synth == 0) { sfont_id = -1; --- 203,209 ---- const char *cfilename = (*env)->GetStringUTFChars(env, filename, 0); int sfont_id; ! fluid_synth_t* synth = get_synth(env, obj); ! ! if (synth == 0) { sfont_id = -1; *************** *** 180,184 **** else { ! sfont_id = fluid_synth_sfload(_synth, cfilename, 1); } (*env)->ReleaseStringUTFChars(env, filename, cfilename); --- 211,215 ---- else { ! sfont_id = fluid_synth_sfload(synth, cfilename, 1); } (*env)->ReleaseStringUTFChars(env, filename, cfilename); *************** *** 196,200 **** (JNIEnv *env, jobject obj, jint sfontID, jint offset) { ! fluid_synth_set_bank_offset(_synth, sfontID, offset); } --- 227,232 ---- (JNIEnv *env, jobject obj, jint sfontID, jint offset) { ! fluid_synth_t* synth = get_synth(env, obj); ! fluid_synth_set_bank_offset(synth, sfontID, offset); } *************** *** 209,212 **** --- 241,247 ---- //printf("3a\n"); //printf("4"); + jclass fluidsoundbankclass; + jfieldID synthFieldID; + jobject synthobj; jclass fluidinstrclass; jmethodID initid; *************** *** 220,223 **** --- 255,264 ---- int offset; int i = 0; + fluid_synth_t* synth; + + fluidsoundbankclass = (*env)->FindClass(env, "org/tritonus/midi/sb/fluidsynth/FluidSoundbank"); + synthFieldID = (*env)->GetFieldID(env, fluidsoundbankclass, "synth", "Lorg/tritonus/midi/device/fluidsynth/FluidSynthesizer;"); + synthobj = (*env)->GetObjectField(env, obj, synthFieldID); + synth = get_synth(env, synthobj); fluidinstrclass = (*env)->FindClass(env, "org/tritonus/midi/sb/fluidsynth/FluidSoundbank$FluidInstrument"); *************** *** 228,232 **** //printf("6"); ! sfont = fluid_synth_get_sfont_by_id(_synth, sfontID); if (sfont != NULL) --- 269,273 ---- //printf("6"); ! sfont = fluid_synth_get_sfont_by_id(synth, sfontID); if (sfont != NULL) *************** *** 243,248 **** instruments = (*env)->NewObjectArray(env, count, fluidinstrclass, NULL); ! sfont = fluid_synth_get_sfont_by_id(_synth, sfontID); ! offset = fluid_synth_get_bank_offset(_synth, sfontID); if (sfont == NULL) --- 284,289 ---- instruments = (*env)->NewObjectArray(env, count, fluidinstrclass, NULL); ! sfont = fluid_synth_get_sfont_by_id(synth, sfontID); ! offset = fluid_synth_get_bank_offset(synth, sfontID); if (sfont == NULL) *************** *** 277,281 **** (JNIEnv *env, jobject obj, jfloat gain) { ! fluid_synth_set_gain(_synth, (float) gain); } --- 318,323 ---- (JNIEnv *env, jobject obj, jfloat gain) { ! fluid_synth_t* synth = get_synth(env, obj); ! fluid_synth_set_gain(synth, (float) gain); } *************** *** 292,296 **** present in fluidsynth 1.0.6 */ ! //fluid_synth_set_reverb_preset(_synth, (int) reverbPreset); } --- 334,338 ---- present in fluidsynth 1.0.6 */ ! //fluid_synth_set_reverb_preset(synth, (int) reverbPreset); } *************** *** 304,310 **** (JNIEnv *env, jobject obj) { ! if (_synth) { ! return fluid_synth_get_polyphony(_synth); } else --- 346,353 ---- (JNIEnv *env, jobject obj) { ! fluid_synth_t* synth = get_synth(env, obj); ! if (synth) { ! return fluid_synth_get_polyphony(synth); } else |
|
From: Henri M. <hfm...@us...> - 2006-02-11 20:49:40
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27296 Modified Files: Makefile.in Log Message: double quotes around include paths for space containing paths in Windows Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/Makefile.in Index: Makefile.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.in 10 Feb 2006 11:08:40 -0000 1.3 --- Makefile.in 11 Feb 2006 20:49:29 -0000 1.4 *************** *** 11,15 **** ARCHNAME=@ARCHNAME@ CC=libtool --mode=compile @CC@ ! CPPFLAGS=-g -Wall -Werror -I$(JAVADIR)/include -I$(JAVADIR)/include/$(OSNAME) #-fPIC -D_REENTRANT #-pedantic INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ --- 11,15 ---- ARCHNAME=@ARCHNAME@ CC=libtool --mode=compile @CC@ ! CPPFLAGS=-g -Wall -Werror -I"$(JAVADIR)/include" -I"$(JAVADIR)/include/$(OSNAME)" #-fPIC -D_REENTRANT #-pedantic INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
From: Henri M. <hfm...@us...> - 2006-02-11 20:47:50
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26782 Modified Files: FluidSynthesizer.java Log Message: Multiple FluidSynth instances Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java Index: FluidSynthesizer.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FluidSynthesizer.java 7 Feb 2006 13:30:16 -0000 1.1 --- FluidSynthesizer.java 11 Feb 2006 20:47:42 -0000 1.2 *************** *** 55,60 **** private MidiChannel channels[]; private FluidSoundbank defaultSoundbank; private int defaultbankSfontID; ! --- 55,65 ---- private MidiChannel channels[]; private FluidSoundbank defaultSoundbank; + private int defaultbankSfontID; ! ! // native pointers *32 bit*! ! private int settingsPtr; ! private int synthPtr; ! private int audioDriverPtr; *************** *** 77,80 **** --- 82,86 ---- throw new Exception("Low-level initialization of the synthesizer failed"); } + System.out.println("FluidSynthesizer: " + Integer.toHexString(synthPtr)); try { *************** *** 92,100 **** public void setDefaultSoundBank(int sfontID) { ! defaultSoundbank = new FluidSoundbank(sfontID); } protected void finalize(){ deleteSynth(); } --- 98,108 ---- public void setDefaultSoundBank(int sfontID) { ! defaultSoundbank = new FluidSoundbank(this, sfontID); ! defaultbankSfontID = sfontID; } protected void finalize(){ + System.out.println("finalize: " + Integer.toHexString(synthPtr)); deleteSynth(); } *************** *** 103,106 **** --- 111,115 ---- public void close() { + System.out.println("close: " + Integer.toHexString(synthPtr)); deleteSynth(); super.close(); *************** *** 179,183 **** public Soundbank getDefaultSoundbank() { ! return defaultSoundbank; } --- 188,192 ---- public Soundbank getDefaultSoundbank() { ! return defaultSoundbank; } |
|
From: Henri M. <hfm...@us...> - 2006-02-11 20:47:17
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26585 Modified Files: FluidSynthesizerProvider.java Log Message: Same as version 1.1. Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizerProvider.java Index: FluidSynthesizerProvider.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizerProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** FluidSynthesizerProvider.java 10 Feb 2006 00:13:12 -0000 1.2 --- FluidSynthesizerProvider.java 11 Feb 2006 20:47:06 -0000 1.3 *************** *** 49,53 **** { private static MidiDevice.Info sm_info; - private static FluidSynthesizer synth = null; --- 49,52 ---- *************** *** 93,106 **** try { ! if (synth == null) { ! synth = new FluidSynthesizer(sm_info); ! String sfontFile = ! System.getProperty("tritonus.fluidsynth.defaultsoundbank"); ! if (sfontFile != null && ! sfontFile.equals("")) ! { ! int sfontID = synth.loadSoundFont(sfontFile); ! synth.setDefaultSoundBank(sfontID); ! } } device = synth; --- 92,102 ---- try { ! FluidSynthesizer synth = new FluidSynthesizer(sm_info); ! String sfontFile = ! System.getProperty("tritonus.fluidsynth.defaultsoundbank"); ! if (sfontFile != null && ! sfontFile.equals("")) { ! int sfontID = synth.loadSoundFont(sfontFile); ! synth.setDefaultSoundBank(sfontID); } device = synth; |
|
From: Matthias P. <pfi...@us...> - 2006-02-10 13:34:02
|
Update of /cvsroot/tritonus/tritonus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25833 Modified Files: INSTALL Log Message: updated Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/INSTALL Index: INSTALL =================================================================== RCS file: /cvsroot/tritonus/tritonus/INSTALL,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** INSTALL 13 Nov 2003 09:50:51 -0000 1.17 --- INSTALL 10 Feb 2006 13:33:41 -0000 1.18 *************** *** 23,28 **** ============= ! - jdk 1.4.x, 1.3.x or jdk1.2.x. Testing was done with the ! Sun jdk1.4.0-b92. Other versions may work. If you want to compile Linux specific components, it is recommended to do it on a Linux system, so you need a j2sdk for Linux. Cross-compiling has not --- 23,28 ---- ============= ! - jdk 1.5.x. Testing was done with the ! Sun jdk 1.5.0-b64. Other versions may work. If you want to compile Linux specific components, it is recommended to do it on a Linux system, so you need a j2sdk for Linux. Cross-compiling has not *************** *** 71,77 **** For the build process: - make (Testing done with GNU make 3.79) ! - ant (Testing done with Apache Ant 1.5; 1.4 should work, too. Get it from http://jakarta.apache.org/ant/ if not present in your distribution) ! - g++ - libtool (currently not needed) - m4 --- 71,77 ---- For the build process: - make (Testing done with GNU make 3.79) ! - ant (Testing done with Apache Ant 1.6; 1.5 should work, too. Get it from http://jakarta.apache.org/ant/ if not present in your distribution) ! - gcc - libtool (currently not needed) - m4 |
|
From: Matthias P. <pfi...@us...> - 2006-02-10 11:08:50
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2571 Modified Files: .cvsignore Makefile.in Log Message: first step to using libtool Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/.cvsignore http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/Makefile.in Index: .cvsignore =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** .cvsignore 7 Feb 2006 20:19:11 -0000 1.1 --- .cvsignore 10 Feb 2006 11:08:40 -0000 1.2 *************** *** 3,5 **** *.o *.so* ! --- 3,7 ---- *.o *.so* ! *.lo ! *.la ! .libs Index: Makefile.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.in 9 Feb 2006 12:54:58 -0000 1.2 --- Makefile.in 10 Feb 2006 11:08:40 -0000 1.3 *************** *** 10,15 **** OSNAME=@OSNAME@ ARCHNAME=@ARCHNAME@ ! CC=@CC@ ! CPPFLAGS=-g -Wall -Werror -I$(JAVADIR)/include -I$(JAVADIR)/include/$(OSNAME) -fPIC -D_REENTRANT #-pedantic INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ --- 10,15 ---- OSNAME=@OSNAME@ ARCHNAME=@ARCHNAME@ ! CC=libtool --mode=compile @CC@ ! CPPFLAGS=-g -Wall -Werror -I$(JAVADIR)/include -I$(JAVADIR)/include/$(OSNAME) #-fPIC -D_REENTRANT #-pedantic INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ *************** *** 20,23 **** --- 20,24 ---- MKDIR_P=@MKDIR_P@ + OBJDIR=../../../@BUILD_DIR@ vpath %.class $(OBJDIR)/org/tritonus/midi/device/fluidsynth *************** *** 46,49 **** --- 47,51 ---- ../common/common.o + LTOBJ:=$(OBJ:.o=.lo) *************** *** 64,72 **** $(LIBDEST): $(OBJ) ! # $(CC) -nostartfiles -shared -Wl,-soname,$(LIBBASENAME).so.1 -o $(LIBDEST) $(OBJ) -L/usr/lib $(LIBS) ## ! ## !!!! modified temporarily for testing !!!! ## ! $(CC) -nostartfiles -shared -Wl,-soname,$(LIBBASENAME).so.1 -Wl,--rpath -Wl,/usr/local/lib -o $(LIBDEST) $(OBJ) -L/usr/lib $(LIBS) $(RM_F) $(LIBBASENAME).so.1 $(LN_S) $(LIBBASENAME).so.1.0 $(LIBBASENAME).so.1 --- 66,76 ---- $(LIBDEST): $(OBJ) ! libtool --mode=link gcc -g -O -o $(LIBBASENAME).la $(LTOBJ) \ ! -rpath /usr/lib $(LIBS) ! ## $(CC) -nostartfiles -shared -Wl,-soname,$(LIBBASENAME).so.1 -o $(LIBDEST) $(OBJ) -L/usr/lib $(LIBS) ## ! ## use this for testing with a custom version of libfluidsynth ## ! ## $(CC) -nostartfiles -shared -Wl,-soname,$(LIBBASENAME).so.1 -Wl,--rpath -Wl,/usr/local/lib -o $(LIBDEST) $(OBJ) -L/usr/lib $(LIBS) $(RM_F) $(LIBBASENAME).so.1 $(LN_S) $(LIBBASENAME).so.1.0 $(LIBBASENAME).so.1 *************** *** 116,117 **** --- 120,122 ---- clean: rm -rf $(LIBDEST) $(JNIHEADERS) *.o *~ + libtool --mode=clean $(RM_F) $(LTOBJ) $(LIBBASENAME).la \ No newline at end of file |
|
From: Henri M. <hfm...@us...> - 2006-02-10 00:13:23
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31365 Modified Files: FluidSynthesizerProvider.java Log Message: static FluidSynthesizer synth singleton member variable added, so a FluidSynthesizer is created only once in getDevice(MidiDevice.Info info) Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizerProvider.java Index: FluidSynthesizerProvider.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/midi/device/fluidsynth/FluidSynthesizerProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FluidSynthesizerProvider.java 7 Feb 2006 13:30:16 -0000 1.1 --- FluidSynthesizerProvider.java 10 Feb 2006 00:13:12 -0000 1.2 *************** *** 49,52 **** --- 49,53 ---- { private static MidiDevice.Info sm_info; + private static FluidSynthesizer synth = null; *************** *** 92,102 **** try { ! FluidSynthesizer synth = new FluidSynthesizer(sm_info); ! String sfontFile = ! System.getProperty("tritonus.fluidsynth.defaultsoundbank"); ! if (sfontFile != null && ! sfontFile.equals("")) { ! int sfontID = synth.loadSoundFont(sfontFile); ! synth.setDefaultSoundBank(sfontID); } device = synth; --- 93,106 ---- try { ! if (synth == null) { ! synth = new FluidSynthesizer(sm_info); ! String sfontFile = ! System.getProperty("tritonus.fluidsynth.defaultsoundbank"); ! if (sfontFile != null && ! sfontFile.equals("")) ! { ! int sfontID = synth.loadSoundFont(sfontFile); ! synth.setDefaultSoundBank(sfontID); ! } } device = synth; |
|
From: Henri M. <hfm...@us...> - 2006-02-09 23:10:39
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2428 Modified Files: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Log Message: Changed to comply to C89 (For Visual Studio C++ 6.0) Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Index: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 9 Feb 2006 12:54:58 -0000 1.2 --- org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 9 Feb 2006 23:10:29 -0000 1.3 *************** *** 209,218 **** //printf("3a\n"); //printf("4"); ! jclass fluidinstrclass = (*env)->FindClass(env, "org/tritonus/midi/sb/fluidsynth/FluidSoundbank$FluidInstrument"); ! if (!fluidinstrclass) printf("could not get class id"); ! //printf("5"); ! jmethodID initid = (*env)->GetMethodID(env, fluidinstrclass, "<init>", "(Lorg/tritonus/midi/sb/fluidsynth/FluidSoundbank;IILjava/lang/String;)V"); ! if (!initid) printf("could not get method id"); ! //printf("6"); int count = 0; jobjectArray instruments; --- 209,214 ---- //printf("3a\n"); //printf("4"); ! jclass fluidinstrclass; ! jmethodID initid; int count = 0; jobjectArray instruments; *************** *** 223,226 **** --- 219,230 ---- fluid_preset_t preset; int offset; + int i = 0; + + fluidinstrclass = (*env)->FindClass(env, "org/tritonus/midi/sb/fluidsynth/FluidSoundbank$FluidInstrument"); + if (!fluidinstrclass) printf("could not get class id"); + //printf("5"); + initid = (*env)->GetMethodID(env, fluidinstrclass, "<init>", "(Lorg/tritonus/midi/sb/fluidsynth/FluidSoundbank;IILjava/lang/String;)V"); + if (!initid) printf("could not get method id"); + //printf("6"); sfont = fluid_synth_get_sfont_by_id(_synth, sfontID); *************** *** 247,251 **** sfont->iteration_start(sfont); - int i = 0; while (sfont->iteration_next(sfont, &preset)) { --- 251,254 ---- |
|
From: Matthias P. <pfi...@us...> - 2006-02-09 12:55:12
|
Update of /cvsroot/tritonus/tritonus/src/lib/fluidsynth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25789 Modified Files: Makefile.in org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c Removed Files: fluidsynth_jni.c fluidsynth_jni.h Log Message: merged fluidsynth_jni.c into main file Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/Makefile.in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/fluidsynth_jni.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/fluidsynth/fluidsynth_jni.h Index: Makefile.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.in 7 Feb 2006 20:19:11 -0000 1.1 --- Makefile.in 9 Feb 2006 12:54:58 -0000 1.2 *************** *** 44,48 **** OBJ=\ $(JNIOBJ) \ - fluidsynth_jni.o \ ../common/common.o --- 44,47 ---- Index: org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 7 Feb 2006 20:19:11 -0000 1.1 --- org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c 9 Feb 2006 12:54:58 -0000 1.2 *************** *** 37,47 **** */ ! /* $$mp: original version: ! #include "fluidsynth_Synth.h" ! */ #include "org_tritonus_midi_device_fluidsynth_FluidSynthesizer.h" #include "org_tritonus_midi_sb_fluidsynth_FluidSoundbank.h" ! #include "fluidsynth_jni.h" /* --- 37,104 ---- */ ! #include <jni.h> ! #include <fluidsynth.h> ! #include "org_tritonus_midi_device_fluidsynth_FluidSynthesizer.h" #include "org_tritonus_midi_sb_fluidsynth_FluidSoundbank.h" ! ! //static int fluid_jni_get_preset_count(int sfontID); ! ! ! static fluid_settings_t* _settings = 0; ! static fluid_synth_t* _synth = 0; ! static fluid_audio_driver_t* _adriver = 0; ! ! static void fluid_jni_delete_synth(); ! ! ! ! static int fluid_jni_new_synth() ! { ! if (_synth == 0) ! { ! _settings = new_fluid_settings(); ! if (_settings == 0) { ! goto error_recovery; ! } ! ! _synth = new_fluid_synth(_settings); ! if (_synth == 0) { ! goto error_recovery; ! } ! ! _adriver = new_fluid_audio_driver(_settings, _synth); ! if (_adriver == 0) { ! goto error_recovery; ! } ! } ! return 0; ! ! error_recovery: ! fluid_jni_delete_synth(); ! return -1; ! } ! ! ! static void fluid_jni_delete_synth() ! { ! if (_adriver) { ! delete_fluid_audio_driver(_adriver); ! _adriver = 0; ! } ! if (_synth) { ! delete_fluid_synth(_synth); ! _synth = 0; ! } ! if (_settings) { ! delete_fluid_settings(_settings); ! _settings = 0; ! } ! } ! ! ! ! /* *************** *** 77,81 **** (JNIEnv *env, jobject obj, jint command, jint channel, jint data1, jint data2) { ! fluid_jni_process_midi(command, channel, data1, data2); } --- 134,164 ---- (JNIEnv *env, jobject obj, jint command, jint channel, jint data1, jint data2) { ! fluid_midi_event_t* event; ! ! //printf("values: %d %d %d %d\n", command, channel, data1, data2); ! //printf("1"); fflush(stdout); ! event = new_fluid_midi_event(); ! if (!event) ! { ! printf("failed to instantiate fluid_midi_event_t\n"); ! return; ! } ! //printf("2"); fflush(stdout); ! fluid_midi_event_set_type(event, command); ! fluid_midi_event_set_channel(event, channel); ! fluid_midi_event_set_key(event, data1); ! fluid_midi_event_set_velocity(event, data2); ! //printf("3"); fflush(stdout); ! /*printf("values2: %d %d %d %d\n", ! fluid_midi_event_get_type(event), ! fluid_midi_event_get_channel(event), ! fluid_midi_event_get_key(event), ! fluid_midi_event_get_velocity(event)); ! fflush(stdout); ! */ ! fluid_synth_handle_midi_event(_synth, event); ! //printf("4"); fflush(stdout); ! delete_fluid_midi_event(event); ! //printf("5\n"); fflush(stdout); } *************** *** 89,99 **** (JNIEnv *env, jobject obj, jstring filename) { - /* $$mp: original version: - const char *cfilename = env->GetStringUTFChars(filename, 0); - int sfont_id = fluid_jni_sfload(cfilename); - env->ReleaseStringUTFChars(filename, cfilename); - */ const char *cfilename = (*env)->GetStringUTFChars(env, filename, 0); ! int sfont_id = fluid_jni_sfload(cfilename); (*env)->ReleaseStringUTFChars(env, filename, cfilename); --- 172,185 ---- (JNIEnv *env, jobject obj, jstring filename) { const char *cfilename = (*env)->GetStringUTFChars(env, filename, 0); ! int sfont_id; ! if (_synth == 0) ! { ! sfont_id = -1; ! } ! else ! { ! sfont_id = fluid_synth_sfload(_synth, cfilename, 1); ! } (*env)->ReleaseStringUTFChars(env, filename, cfilename); *************** *** 110,114 **** (JNIEnv *env, jobject obj, jint sfontID, jint offset) { ! fluid_jni_set_bank_offset(sfontID, offset); } --- 196,200 ---- (JNIEnv *env, jobject obj, jint sfontID, jint offset) { ! fluid_synth_set_bank_offset(_synth, sfontID, offset); } *************** *** 121,137 **** (JNIEnv *env, jobject obj, jint sfontID) { - jobjectArray arr; //printf("3a\n"); ! arr = fluid_jni_get_presets(env, obj, sfontID); ! //printf("3b\n"); ! return arr; } - /* $$mp: original version: - JNIEXPORT void JNICALL Java_fluidsynth_Synth_setGain(JNIEnv *, jobject, jfloat gain) - { - fluid_jni_set_gain((float) gain); - } - */ /* --- 207,268 ---- (JNIEnv *env, jobject obj, jint sfontID) { //printf("3a\n"); ! //printf("4"); ! jclass fluidinstrclass = (*env)->FindClass(env, "org/tritonus/midi/sb/fluidsynth/FluidSoundbank$FluidInstrument"); ! if (!fluidinstrclass) printf("could not get class id"); ! //printf("5"); ! jmethodID initid = (*env)->GetMethodID(env, fluidinstrclass, "<init>", "(Lorg/tritonus/midi/sb/fluidsynth/FluidSoundbank;IILjava/lang/String;)V"); ! if (!initid) printf("could not get method id"); ! //printf("6"); ! int count = 0; ! jobjectArray instruments; ! jstring instrname; ! jobject instrument; ! ! fluid_sfont_t* sfont; ! fluid_preset_t preset; ! int offset; ! ! sfont = fluid_synth_get_sfont_by_id(_synth, sfontID); ! ! if (sfont != NULL) ! { ! sfont->iteration_start(sfont); ! ! while (sfont->iteration_next(sfont, &preset)) ! { ! count++; ! } ! } ! ! //printf("7"); ! instruments = (*env)->NewObjectArray(env, count, fluidinstrclass, NULL); ! ! sfont = fluid_synth_get_sfont_by_id(_synth, sfontID); ! offset = fluid_synth_get_bank_offset(_synth, sfontID); ! ! if (sfont == NULL) ! return 0; ! ! sfont->iteration_start(sfont); ! ! int i = 0; ! while (sfont->iteration_next(sfont, &preset)) ! { ! instrname = (*env)->NewStringUTF(env, ! // fluid_preset_get_name(&preset) ! preset.get_name(&preset) ! ); ! instrument = (*env)->NewObject(env, fluidinstrclass, initid, obj, ! // (jint) fluid_preset_get_banknum(&preset) + offset, ! (jint) (preset.get_banknum(&preset) + offset), ! // (jint) fluid_preset_get_num(&preset), ! (jint) (preset.get_num(&preset)), ! (jobject) instrname); ! (*env)->SetObjectArrayElement(env, instruments, i++, instrument); ! } ! return instruments; } /* *************** *** 143,155 **** (JNIEnv *env, jobject obj, jfloat gain) { ! fluid_jni_set_gain((float) gain); } - /* $$mp: original version: - JNIEXPORT int JNICALL Java_fluidsynth_Synth_setReverbPreset(JNIEnv *, jobject, jint reverbPreset) - { - return fluid_jni_set_reverb_preset((int) reverbPreset); - } - */ /* --- 274,280 ---- (JNIEnv *env, jobject obj, jfloat gain) { ! fluid_synth_set_gain(_synth, (float) gain); } /* *************** *** 164,168 **** present in fluidsynth 1.0.6 */ ! // fluid_jni_set_reverb_preset((int) reverbPreset); } --- 289,293 ---- present in fluidsynth 1.0.6 */ ! //fluid_synth_set_reverb_preset(_synth, (int) reverbPreset); } *************** *** 176,181 **** (JNIEnv *env, jobject obj) { ! return fluid_jni_get_polyphony(); } /* org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c */ --- 301,314 ---- (JNIEnv *env, jobject obj) { ! if (_synth) ! { ! return fluid_synth_get_polyphony(_synth); ! } ! else ! { ! return -99; ! } } + /* org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c */ --- fluidsynth_jni.c DELETED --- --- fluidsynth_jni.h DELETED --- |