some fixes for dano
fix SoftSynth::PlayHandler, offset and incr are counted in samples git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17853 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
#include <Midi.h>
|
#include <Midi.h>
|
||||||
|
|
||||||
|
class BMidiConsumer;
|
||||||
|
class BMidiProducer;
|
||||||
|
|
||||||
namespace BPrivate { class BMidiPortGlue; }
|
namespace BPrivate { class BMidiPortGlue; }
|
||||||
|
|
||||||
class BMidiPort : public BMidi
|
class BMidiPort : public BMidi
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#define _MIDI_ENDPOINT_H
|
#define _MIDI_ENDPOINT_H
|
||||||
|
|
||||||
#include <BeBuild.h>
|
#include <BeBuild.h>
|
||||||
|
#include <Message.h>
|
||||||
#include <Midi2Defs.h>
|
#include <Midi2Defs.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
SubDir HAIKU_TOP src kits midi ;
|
SubDir HAIKU_TOP src kits midi ;
|
||||||
|
|
||||||
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
|
if $(TARGET_PLATFORM) != haiku {
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os midi ] : true ;
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os midi2 ] : true ;
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os ] : true ;
|
||||||
|
}
|
||||||
|
|
||||||
UsePrivateHeaders midi ;
|
UsePrivateHeaders midi ;
|
||||||
UseLibraryHeaders fluidsynth ;
|
UseLibraryHeaders fluidsynth ;
|
||||||
|
|
||||||
@@ -16,7 +24,7 @@ SharedLibrary libmidi.so :
|
|||||||
Synth.cpp
|
Synth.cpp
|
||||||
:
|
:
|
||||||
be
|
be
|
||||||
midi2
|
libmidi2.so
|
||||||
media
|
media
|
||||||
libfluidsynth.so
|
libfluidsynth.so
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#ifndef _MIDI_GLUE_H
|
#ifndef _MIDI_GLUE_H
|
||||||
#define _MIDI_GLUE_H
|
#define _MIDI_GLUE_H
|
||||||
|
|
||||||
|
#include <MidiPort.h>
|
||||||
#include <MidiConsumer.h>
|
#include <MidiConsumer.h>
|
||||||
|
|
||||||
#define MAKE_TIME(t) (t / (bigtime_t)1000)
|
#define MAKE_TIME(t) (t / (bigtime_t)1000)
|
||||||
|
|||||||
@@ -488,8 +488,9 @@ BSoftSynth::PlayBuffer(void * cookie, void * data, size_t size, const media_raw_
|
|||||||
|
|
||||||
// we use float samples
|
// we use float samples
|
||||||
|
|
||||||
|
if (synth->fSynth)
|
||||||
fluid_synth_write_float(synth->fSynth, size / sizeof(float) / format.channel_count,
|
fluid_synth_write_float(synth->fSynth, size / sizeof(float) / format.channel_count,
|
||||||
data, 0, sizeof(float) * format.channel_count,
|
data, 0, format.channel_count,
|
||||||
(char *)data + sizeof(float), 0, sizeof(float) * format.channel_count);
|
data, 1, format.channel_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
SubDir HAIKU_TOP src kits midi2 ;
|
SubDir HAIKU_TOP src kits midi2 ;
|
||||||
|
|
||||||
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
|
if $(TARGET_PLATFORM) != haiku {
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os midi2 ] : true ;
|
||||||
|
# We need Errors.h also when not compiling for Haiku.
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) headers posix ] : true ;
|
||||||
|
# We need Errors.h also when not compiling for Haiku.
|
||||||
|
}
|
||||||
|
|
||||||
UsePrivateHeaders midi ;
|
UsePrivateHeaders midi ;
|
||||||
|
|
||||||
SharedLibrary libmidi2.so :
|
SharedLibrary libmidi2.so :
|
||||||
|
|||||||
@@ -96,6 +96,7 @@
|
|||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
#define HAVE_SYS_IOCTL_H 1
|
#define HAVE_SYS_IOCTL_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
|
|
||||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
#define HAVE_SYS_SOCKET_H 1
|
#define HAVE_SYS_SOCKET_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||||
/* #undef HAVE_SYS_SOUNDCARD_H */
|
/* #undef HAVE_SYS_SOUNDCARD_H */
|
||||||
@@ -187,5 +189,6 @@
|
|||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
|
|
||||||
#define WITHOUT_SERVER 1
|
#define WITHOUT_SERVER 1
|
||||||
|
#include <support/SupportDefs.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user