Move SoundConsumer to libmedia in the BPrivate namespace
Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
d96e687652
commit
59b4be8cc1
@@ -31,6 +31,8 @@
|
||||
#include <BufferConsumer.h>
|
||||
#include "SoundUtils.h"
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
class SoundConsumer : public BBufferConsumer {
|
||||
public:
|
||||
@@ -143,5 +145,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // SOUND_CONSUMER_H
|
||||
}
|
||||
|
||||
|
||||
#endif // SOUND_CONSUMER_H
|
||||
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src apps soundrecorder ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
UsePrivateHeaders shared media ;
|
||||
|
||||
Application SoundRecorder :
|
||||
DrawButton.cpp
|
||||
@@ -11,9 +11,7 @@ Application SoundRecorder :
|
||||
RecorderApp.cpp
|
||||
RecorderWindow.cpp
|
||||
ScopeView.cpp
|
||||
SoundConsumer.cpp
|
||||
SoundListView.cpp
|
||||
SoundUtils.cpp
|
||||
TrackSlider.cpp
|
||||
TransportButton.cpp
|
||||
UpDownButton.cpp
|
||||
|
||||
@@ -29,17 +29,25 @@
|
||||
#include "VolumeSlider.h"
|
||||
#include "VUView.h"
|
||||
|
||||
|
||||
class BMediaRoster;
|
||||
class BBox;
|
||||
class BButton;
|
||||
class BCheckBox;
|
||||
class BMenuField;
|
||||
class SoundConsumer;
|
||||
class SoundListView;
|
||||
class BScrollView;
|
||||
class BSlider;
|
||||
class BStringView;
|
||||
|
||||
namespace BPrivate {
|
||||
class SoundConsumer;
|
||||
}
|
||||
|
||||
|
||||
using BPrivate::SoundConsumer;
|
||||
|
||||
|
||||
class RecorderWindow : public BWindow {
|
||||
public:
|
||||
RecorderWindow();
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/*******************************************************************************
|
||||
/
|
||||
/ File: SoundPrivate.h
|
||||
/
|
||||
/ Description: Implementation headers for SoundConsumer and SoundProducer.
|
||||
/
|
||||
/ Copyright 1998-1999, Be Incorporated, All Rights Reserved
|
||||
/
|
||||
*******************************************************************************/
|
||||
|
||||
#if ! defined( _SoundPrivate_h )
|
||||
#define _SoundPrivate_h
|
||||
|
||||
// The following are implementation details that we don't
|
||||
// want to expose to the world at large.
|
||||
|
||||
#include "SoundUtils.h"
|
||||
|
||||
// This structure is the body of a request that we use to
|
||||
// implement SetHooks().
|
||||
struct set_hooks_q {
|
||||
port_id reply;
|
||||
void * cookie;
|
||||
SoundProcessFunc process;
|
||||
SoundNotifyFunc notify;
|
||||
};
|
||||
|
||||
// All incoming buffers and Media Kit requests arrive at a
|
||||
// media node in the form of messages (which are generally
|
||||
// dispatched for you by your superclasses' HandleMessage
|
||||
// implementations). Each message has a 'type' which is
|
||||
// analagous to a BMessage's 'what' field. We'll define our
|
||||
// own private message types for our SoundConsumer and
|
||||
// SoundProducer to use. The BeOS reserves a range,
|
||||
// 0x60000000 to 0x7fffffff, for us to use.
|
||||
enum {
|
||||
MSG_QUIT_NOW = 0x60000000L,
|
||||
MSG_CHANGE_HOOKS
|
||||
};
|
||||
|
||||
#endif /* _SoundPrivate_h */
|
||||
@@ -16,6 +16,7 @@ if $(CHECK_MALLOC) {
|
||||
SharedLibrary libmedia.so :
|
||||
# Private Media Kit
|
||||
!missing_symbols.cpp
|
||||
SoundConsumer.cpp
|
||||
|
||||
# Public Media Kit
|
||||
Buffer.cpp
|
||||
@@ -59,6 +60,7 @@ SharedLibrary libmedia.so :
|
||||
TimeSourceObject.cpp
|
||||
TimeSourceObjectManager.cpp
|
||||
SoundPlayNode.cpp
|
||||
SoundUtils.cpp
|
||||
|
||||
# Old (R3) Media Kit (built only for GCC2)
|
||||
OldAudioModule.cpp
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
#include <TimeSource.h>
|
||||
|
||||
#include "AutoDeleter.h"
|
||||
#include "SoundPrivate.h"
|
||||
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
// If we don't mind the format changing to another format while
|
||||
// running, we can define this to 1. Look for the symbol down in the source.
|
||||
#define ACCEPT_ANY_FORMAT_CHANGE 0
|
||||
@@ -51,6 +53,30 @@ using std::nothrow;
|
||||
#endif
|
||||
|
||||
|
||||
// This structure is the body of a request that we use to
|
||||
// implement SetHooks().
|
||||
struct set_hooks_q {
|
||||
port_id reply;
|
||||
void * cookie;
|
||||
SoundProcessFunc process;
|
||||
SoundNotifyFunc notify;
|
||||
};
|
||||
|
||||
|
||||
// All incoming buffers and Media Kit requests arrive at a
|
||||
// media node in the form of messages (which are generally
|
||||
// dispatched for you by your superclasses' HandleMessage
|
||||
// implementations). Each message has a 'type' which is
|
||||
// analagous to a BMessage's 'what' field. We'll define our
|
||||
// own private message types for our SoundConsumer and
|
||||
// SoundProducer to use. The BeOS reserves a range,
|
||||
// 0x60000000 to 0x7fffffff, for us to use.
|
||||
enum {
|
||||
MSG_QUIT_NOW = 0x60000000L,
|
||||
MSG_CHANGE_HOOKS
|
||||
};
|
||||
|
||||
|
||||
SoundConsumer::SoundConsumer(
|
||||
const char * name,
|
||||
SoundProcessFunc recordFunc,
|
||||
@@ -672,3 +698,5 @@ SoundConsumer::Notify(int32 /*cause*/, ...)
|
||||
// If there is no notification hook installed, we instead call this
|
||||
// function for giving notification of various events.
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user