added new mixer components

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3446 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-06-07 01:11:51 +00:00
parent 2eb7012d8e
commit 678c20170c
7 changed files with 148 additions and 3 deletions

View File

@ -1,11 +1,12 @@
SubDir OBOS_TOP src add-ons media media-add-ons mixer ; SubDir OBOS_TOP src add-ons media media-add-ons mixer ;
UsePrivateHeaders media ;
Addon mixer.media_addon : media : Addon mixer.media_addon : media :
AudioMixer.cpp AudioMixer.cpp
MixerAddOn.cpp
FillMixBuffer.cpp FillMixBuffer.cpp
MixerAddOn.cpp
MixerCore.cpp
MixerInput.cpp
MixerOutput.cpp
Resampler.cpp Resampler.cpp
; ;

View File

@ -0,0 +1,38 @@
#include <MediaNode.h>
#include "MixerCore.h"
#include "MixerInput.h"
#include "MixerOutput.h"
MixerCore::MixerCore()
: fLocker(new BLocker)
{
}
MixerCore::~MixerCore()
{
delete fLocker;
}
bool
MixerCore::AddInput(const media_input &input)
{
return true;
}
bool
MixerCore::AddOutput(const media_output &output)
{
return true;
}
bool
MixerCore::RemoveInput(const media_input &input)
{
return true;
}
bool
MixerCore::RemoveOutput(const media_output &output)
{
return true;
}

View File

@ -0,0 +1,40 @@
#ifndef _MIXER_CORE_H
#define _MIXER_CORE_H
#include <Locker.h>
class MixerInput;
class MixerOutput;
class MixerCore
{
public:
MixerCore();
~MixerCore();
bool AddInput(const media_input &input);
bool AddOutput(const media_output &output);
bool RemoveInput(const media_input &input);
bool RemoveOutput(const media_output &output);
void Lock();
void Unlock();
private:
BLocker *fLocker;
};
inline void MixerCore::Lock()
{
fLocker->Lock();
}
inline void MixerCore::Unlock()
{
fLocker->Unlock();
}
#endif

View File

@ -0,0 +1,18 @@
#include <MediaNode.h>
#include "MixerInput.h"
#include "MixerCore.h"
MixerInput::MixerInput(MixerCore *core)
: fCore(core)
{
}
MixerInput::~MixerInput()
{
}
void
MixerInput::BufferReceived(BBuffer *buffer)
{
}

View File

@ -0,0 +1,18 @@
#ifndef _MIXER_INPUT_H
#define _MIXER_INPUT_H
class MixerCore;
class MixerInput
{
public:
MixerInput(MixerCore *core);
~MixerInput();
void BufferReceived(BBuffer *buffer);
private:
MixerCore *fCore;
};
#endif

View File

@ -0,0 +1,14 @@
#include <MediaNode.h>
#include "MixerOutput.h"
#include "MixerCore.h"
MixerOutput::MixerOutput(MixerCore *core)
: fCore(core)
{
}
MixerOutput::~MixerOutput()
{
}

View File

@ -0,0 +1,16 @@
#ifndef _MIXER_OUTPUT_H
#define _MIXER_OUTPUT_H
class MixerCore;
class MixerOutput
{
public:
MixerOutput(MixerCore *core);
~MixerOutput();
private:
MixerCore *fCore;
};
#endif