Made correction asked to me

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1957 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
jerl1
2002-11-16 16:38:59 +00:00
parent 42010ad93f
commit f9493271b8
6 changed files with 446 additions and 394 deletions
+9 -7
View File
@@ -67,11 +67,12 @@ private:
virtual void Run(); virtual void Run();
friend class BMidiPortConsumer; friend class BMidiPortConsumer;
void Dispatch( //Can I do that?
const unsigned char* buffer, size_t size, bigtime_t when); // void Dispatch(
// const unsigned char* buffer, size_t size, bigtime_t when);
ssize_t Read(void* buffer, size_t numBytes) const; // ssize_t Read(void* buffer, size_t numBytes) const;
ssize_t Write(void* buffer, size_t numBytes, uint32 time) const; // ssize_t Write(void* buffer, size_t numBytes, uint32 time) const;
void ScanDevices(); void ScanDevices();
@@ -84,9 +85,10 @@ private:
char* fName; char* fName;
status_t fCStatus; status_t fCStatus;
BList* _fDevices; BList* _fDevices;
uint8 _m_prev_cmd; // uint8 _m_prev_cmd;
bool _m_enhanced; // bool _m_enhanced;
uint8 _m_reserved[2]; // uint8 _m_reserved[2];
uint8 _reserved[4];
}; };
#endif // _MIDI_PORT_H #endif // _MIDI_PORT_H
+302 -317
View File
@@ -1,317 +1,302 @@
/** /**
* @file MidiPort.cpp * @file MidiPort.cpp
* *
* @author Jerome Leveque * @author Jerome Leveque
*/ * @author Matthijs Hollemans
*/
//----------------------------------------
#include "debug.h"
#include "MidiPortConsumer.cpp" #include "MidiPort.h"
//---------------------------------------- //------------------------------------------------------------------------------
#include <MidiPort.h> #include "MidiPortConsumer.h"
#include <MidiRoster.h>
#include <string.h> //------------------------------------------------------------------------------
#include <MidiProducer.h> #include <MidiRoster.h>
#include <string.h>
//#define DEBUG
#include <MidiProducer.h>
//----------------------------------------
//Public function //------------------------------------------------------------------------------
BMidiPort::BMidiPort(const char *name = NULL) BMidiPort::BMidiPort(const char* name)
: BMidi(), : BMidi(),
remote_source(NULL), remote_source(NULL),
remote_sink(NULL), remote_sink(NULL),
fCStatus(B_ERROR), fName(NULL),
_fDevices(new BList) fCStatus(B_ERROR),
{ _fDevices(new BList)
local_source = new BMidiLocalProducer("MidiPortGlue(out)"); {
if (local_source != NULL) local_source = new BMidiLocalProducer("MidiPortGlue(out)");
local_source->Register(); if (local_source != NULL)
local_sink = new BMidiPortConsumer(this, "MidiPortGlue(in)"); local_source->Register();
if (local_sink != NULL) local_sink = new BMidiPortConsumer(this, "MidiPortGlue(in)");
local_sink->Register(); if (local_sink != NULL)
local_sink->Register();
ScanDevices();
Open(name); ScanDevices();
} Open(name);
}
//-----------------
//------------------------------------------------------------------------------
BMidiPort::~BMidiPort()
{ BMidiPort::~BMidiPort()
Close(); {
delete fName; Close();
if (local_source) delete fName;
local_source->Release(); delete _fDevices;
if (local_sink) if (local_source)
local_sink->Release(); local_source->Release();
} if (local_sink)
local_sink->Release();
//---------------------------------------- }
status_t BMidiPort::InitCheck() const //------------------------------------------------------------------------------
{
return fCStatus; status_t BMidiPort::InitCheck() const
} {
return fCStatus;
//----------------- }
status_t BMidiPort::Open(const char *name) //------------------------------------------------------------------------------
{
if (name == NULL) status_t BMidiPort::Open(const char* name)
return fCStatus = B_ERROR; {
if (name == NULL)
if (remote_source != NULL) return fCStatus = B_ERROR;
{
if (local_sink != NULL) Close();
{
remote_source->Disconnect(local_sink); int32 id = 0;
} BMidiRoster *roster = BMidiRoster::MidiRoster();
remote_source->Release(); if (roster == NULL)
remote_source = NULL; return fCStatus = B_ERROR;
} BMidiEndpoint *endpt = NULL;
if (remote_sink != NULL) while ((endpt = roster->NextEndpoint(&id)) != NULL)
{ {
if (local_source != NULL) if (strcmp(endpt->Name(), name) == 0)
{ {//An endpoint have the same name as we want
local_source->Disconnect(remote_sink); delete fName;
} fName = new char[strlen(name)];
remote_sink->Release(); if (fName != NULL)
remote_sink = NULL; strcpy(fName, name);
} //Can an Endpoint be Consumer AND Producer?
if (endpt->IsProducer())
int32 id = 0; {
BMidiRoster *roster = BMidiRoster::MidiRoster(); remote_source = (BMidiProducer*)endpt;
if (roster == NULL) // endpt->Acquire(); //Because we always call Release()
return fCStatus = B_ERROR; }
BMidiEndpoint *endpt = NULL; if (endpt->IsConsumer())
while ((endpt = roster->NextEndpoint(&id)) != NULL) {
{ remote_sink = (BMidiConsumer*)endpt;
if (strcmp(endpt->Name(), name) == 0) // endpt->Acquire();//Because we always call Release()
{//An endpoint have the same name as we want if (local_source != NULL)
fName = new char[strlen(name)]; local_source->Connect(remote_sink);
if (fName != NULL) }
strcpy(fName, name); }
if (endpt->IsProducer()) else
{ {
remote_source = (BMidiProducer*)endpt; endpt->Release();
endpt->Acquire(); //Because we always call Release() }
} }
if (endpt->IsConsumer()) return fCStatus = B_OK;
{ }
remote_sink = (BMidiConsumer*)endpt;
endpt->Acquire();//Because we always call Release() //------------------------------------------------------------------------------
if (local_source != NULL)
local_source->Connect(remote_sink); void BMidiPort::Close()
} {
} if (remote_source != NULL)
endpt->Release(); {
} if (local_sink != NULL)
return fCStatus = B_OK; {
} remote_source->Disconnect(local_sink);
}
//----------------- remote_source->Release();
remote_source = NULL;
void BMidiPort::Close() }
{ if (remote_sink != NULL)
if ((local_sink != NULL) && (remote_source != NULL)) {
{ if (local_source != NULL)
remote_source->Disconnect(local_sink); {
remote_source->Release(); local_source->Disconnect(remote_sink);
remote_source = NULL; }
} remote_sink->Release();
if ((local_source != NULL) && (remote_sink != NULL)) remote_sink = NULL;
{ }
local_source->Disconnect(remote_sink); }
remote_sink->Release();
remote_sink = NULL; //------------------------------------------------------------------------------
}
} const char* BMidiPort::PortName() const
{
//----------------- return fName;
}
int32 BMidiPort::CountDevices()
{ //------------------------------------------------------------------------------
return _fDevices->CountItems();
} void BMidiPort::NoteOff(
uchar channel, uchar note, uchar velocity, uint32 time)
//----------------- {
local_source->SprayNoteOff(channel, note, velocity, 0);
status_t BMidiPort::GetDeviceName(int32 n, char *name, size_t bufSize) }
{
BMidiEndpoint *endpt = (BMidiEndpoint*)_fDevices->ItemAt(n); //------------------------------------------------------------------------------
if (endpt == NULL)
return B_BAD_VALUE; void BMidiPort::NoteOn(
size_t size = strlen(endpt->Name()); uchar channel, uchar note, uchar velocity, uint32 time)
if (size > bufSize) {
return B_NAME_TOO_LONG; local_source->SprayNoteOn(channel, note, velocity, 0);
if (strlen(strcpy(name, endpt->Name())) == size) }
return B_OK;
else //------------------------------------------------------------------------------
return B_ERROR;
} void BMidiPort::KeyPressure(
uchar channel, uchar note, uchar pressure, uint32 time)
//----------------- {
local_source->SprayKeyPressure(channel, note, pressure, 0);
const char *BMidiPort::PortName() const }
{
return fName; //------------------------------------------------------------------------------
}
void BMidiPort::ControlChange(
//---------------------------------------- uchar channel, uchar controlNumber, uchar controlValue, uint32 time)
{
void BMidiPort::NoteOff(uchar channel, uchar note, uchar velocity, uint32 time = B_NOW) local_source->SprayControlChange(channel, controlNumber, controlValue, 0);
{ }
local_source->SprayNoteOff(channel, note, velocity, 0);
} //------------------------------------------------------------------------------
//----------------- void BMidiPort::ProgramChange(
uchar channel, uchar programNumber, uint32 time)
void BMidiPort::NoteOn(uchar channel, uchar note, uchar velocity, uint32 time = B_NOW) {
{ local_source->SprayProgramChange(channel, programNumber, 0);
local_source->SprayNoteOn(channel, note, velocity, 0); }
}
//------------------------------------------------------------------------------
//-----------------
void BMidiPort::ChannelPressure(uchar channel, uchar pressure, uint32 time)
void BMidiPort::KeyPressure(uchar channel, uchar note, uchar pressure, uint32 time = B_NOW) {
{ local_source->SprayChannelPressure(channel, pressure, 0);
local_source->SprayKeyPressure(channel, note, pressure, 0); }
}
//------------------------------------------------------------------------------
//-----------------
void BMidiPort::PitchBend(uchar channel, uchar lsb, uchar msb, uint32 time)
void BMidiPort::ControlChange(uchar channel, uchar controlNumber, uchar controlValue, uint32 time = B_NOW) {
{ local_source->SprayPitchBend(channel, lsb, msb, 0);
local_source->SprayControlChange(channel, controlNumber, controlValue, 0); }
}
//------------------------------------------------------------------------------
//-----------------
void BMidiPort::SystemExclusive(void* data, size_t dataLength, uint32 time)
void BMidiPort::ProgramChange(uchar channel, uchar programNumber, uint32 time = B_NOW) {
{ local_source->SpraySystemExclusive(data, dataLength, 0);
local_source->SprayProgramChange(channel, programNumber, 0); }
}
//------------------------------------------------------------------------------
//-----------------
void BMidiPort::SystemCommon(
void BMidiPort::ChannelPressure(uchar channel, uchar pressure, uint32 time = B_NOW) uchar status, uchar data1, uchar data2, uint32 time)
{ {
local_source->SprayChannelPressure(channel, pressure, 0); local_source->SpraySystemCommon(statusByte, data1, data2, 0);
} }
//----------------- //------------------------------------------------------------------------------
void BMidiPort::PitchBend(uchar channel, uchar lsb, uchar msb, uint32 time = B_NOW) void BMidiPort::SystemRealTime(uchar status, uint32 time)
{ {
local_source->SprayPitchBend(channel, lsb, msb, 0); local_source->SpraySystemRealTime(statusByte, 0);
} }
//----------------- //------------------------------------------------------------------------------
void BMidiPort::SystemExclusive(void* data, size_t dataLength, uint32 time = B_NOW) status_t BMidiPort::Start()
{ {
local_source->SpraySystemExclusive(data, dataLength, 0); if ((local_sink != NULL) && (remote_source != NULL))
} if ((fCStatus = remote_source->Connect(local_sink)) != B_OK)
return fCStatus;
//----------------- else
{
void BMidiPort::SystemCommon(uchar statusByte, uchar data1, uchar data2, uint32 time = B_NOW) return BMidi::Start();
{ }
local_source->SpraySystemCommon(statusByte, data1, data2, 0); else
} return fCStatus = B_ERROR;
}
//-----------------
//------------------------------------------------------------------------------
void BMidiPort::SystemRealTime(uchar statusByte, uint32 time = B_NOW)
{ void BMidiPort::Stop()
local_source->SpraySystemRealTime(statusByte, 0); {
} if ((remote_source != NULL) && (local_sink != NULL))
{
//---------------------------------------- remote_source->Disconnect(local_sink);
}
status_t BMidiPort::Start() BMidi::Stop();
{ }
if ((local_sink != NULL) && (remote_source != NULL))
if ((fCStatus = remote_source->Connect(local_sink)) != B_OK) //------------------------------------------------------------------------------
return fCStatus;
else int32 BMidiPort::CountDevices()
{ {
return BMidi::Start(); return _fDevices->CountItems();
} }
else
return fCStatus = B_ERROR; //------------------------------------------------------------------------------
}
status_t BMidiPort::GetDeviceName(int32 n, char* name, size_t bufSize)
//----------------- {
BMidiEndpoint *endpt = (BMidiEndpoint*)_fDevices->ItemAt(n);
void BMidiPort::Stop() if (endpt == NULL)
{ return B_BAD_VALUE;
if ((remote_source != NULL) && (local_sink != NULL)) size_t size = strlen(endpt->Name());
{ if (size > bufSize)
remote_source->Disconnect(local_sink); return B_NAME_TOO_LONG;
} if (strlen(strcpy(name, endpt->Name())) == size)
BMidi::Stop(); return B_OK;
} else
return B_ERROR;
//---------------------------------------- }
//Private Function
//------------------------------------------------------------------------------
void BMidiPort::_ReservedMidiPort1() {}
void BMidiPort::_ReservedMidiPort2() {} void BMidiPort::_ReservedMidiPort1() { }
void BMidiPort::_ReservedMidiPort3() {} void BMidiPort::_ReservedMidiPort2() { }
void BMidiPort::_ReservedMidiPort3() { }
//----------------------------------------
//Not Used function //------------------------------------------------------------------------------
void BMidiPort::Dispatch(const unsigned char *buffer, size_t size, bigtime_t when) {} void BMidiPort::Run()
ssize_t BMidiPort::Read(void *buffer, size_t numBytes) const { return 0; } {
ssize_t BMidiPort::Write(void *buffer, size_t numBytes, uint32 time) const { return 0; } while(KeepRunning())
snooze(50000);
//----------------- }
//Used function
//------------------------------------------------------------------------------
void BMidiPort::Run()
{ void BMidiPort::ScanDevices()
while(KeepRunning()) {
snooze(50000); int32 id = 0;
} BMidiRoster *roster = BMidiRoster::MidiRoster();
if (roster == NULL)
//----------------- return;
BMidiEndpoint *endpt = NULL;
void BMidiPort::ScanDevices() while ((endpt = roster->NextEndpoint(&id)) != NULL)
{ {
int32 id = 0; bool additem = true;
BMidiRoster *roster = BMidiRoster::MidiRoster(); for (int32 i = 0; i < _fDevices->CountItems(); i++)
if (roster == NULL) {
return; BMidiEndpoint *endpoint = (BMidiEndpoint*)_fDevices->ItemAt(i);
BMidiEndpoint *endpt = NULL; if (strcmp(endpt->Name(), endpoint->Name()) == 0)
while ((endpt = roster->NextEndpoint(&id)) != NULL) additem = false;
{ }
bool additem = true; if (additem)
for (int32 i = 0; i < _fDevices->CountItems(); i++) _fDevices->AddItem(endpt);
{ endpt->Release();
BMidiEndpoint *endpoint = (BMidiEndpoint*)_fDevices->ItemAt(i); }
if (strcmp(endpt->Name(), endpoint->Name()) == 0) }
additem = false;
} //------------------------------------------------------------------------------
if (additem)
_fDevices->AddItem(endpt);
endpt->Release();
}
}
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
+81 -58
View File
@@ -6,69 +6,92 @@
//---------------------------------------- //----------------------------------------
#include <MidiConsumer.h> #include <MidiPortConsumer.h>
#include <MidiPort.h>
//---------------------------------------- //----------------------------------------
class BMidiPortConsumer : public BMidiLocalConsumer BMidiPortConsumer::BMidiPortConsumer(BMidiPort *toPort, const char *name = NULL)
: BMidiLocalConsumer(name), port(toPort)
{ {
public: }
BMidiPortConsumer(BMidiPort *toPort, const char *name = NULL)
: BMidiLocalConsumer(name), port(toPort) {}
void NoteOff(uchar channel, uchar note, uchar velocity, bigtime_t time) //-----------------
{
port->SprayNoteOff(channel, note, velocity, B_NOW);
}
void NoteOn(uchar channel, uchar note, uchar velocity, bigtime_t time)
{
port->SprayNoteOn(channel, note, velocity, B_NOW);
}
void KeyPressure(uchar channel, uchar note, uchar pressure, bigtime_t time)
{
port->SprayKeyPressure(channel, note, pressure, B_NOW);
}
void ControlChange(uchar channel, uchar controlNumber, uchar controlValue, bigtime_t time)
{
port->SprayControlChange(channel, controlNumber, controlValue, B_NOW);
}
void ProgramChange(uchar channel, uchar programNumber, bigtime_t time)
{
port->SprayProgramChange(channel, programNumber, B_NOW);
}
void ChannelPressure(uchar channel, uchar pressure, bigtime_t time)
{
port->SprayChannelPressure(channel, pressure, B_NOW);
}
void PitchBend(uchar channel, uchar lsb, uchar msb, bigtime_t time)
{
port->SprayPitchBend(channel, lsb, msb, B_NOW);
}
void SystemExclusive(void *data, size_t dataLength, bigtime_t time)
{
port->SpraySystemExclusive(data, dataLength, B_NOW);
}
void SystemCommon(uchar statusByte, uchar data1, uchar data2, bigtime_t time)
{
port->SpraySystemCommon(statusByte, data1, data2, B_NOW);
}
void SystemRealTime(uchar statusByte, bigtime_t time)
{
port->SpraySystemRealTime(statusByte, B_NOW);
}
private: void BMidiPortConsumer::NoteOff(uchar channel, uchar note, uchar velocity, bigtime_t time)
BMidiPort *port; {
port->SprayNoteOff(channel, note, velocity, B_NOW);
}
}; //-----------------
void BMidiPortConsumer::NoteOn(uchar channel, uchar note, uchar velocity, bigtime_t time)
{
port->SprayNoteOn(channel, note, velocity, B_NOW);
}
//-----------------
void BMidiPortConsumer::KeyPressure(uchar channel, uchar note, uchar pressure, bigtime_t time)
{
port->SprayKeyPressure(channel, note, pressure, B_NOW);
}
//-----------------
void BMidiPortConsumer::ControlChange(uchar channel, uchar controlNumber, uchar controlValue, bigtime_t time)
{
port->SprayControlChange(channel, controlNumber, controlValue, B_NOW);
}
//-----------------
void BMidiPortConsumer::ProgramChange(uchar channel, uchar programNumber, bigtime_t time)
{
port->SprayProgramChange(channel, programNumber, B_NOW);
}
//-----------------
void BMidiPortConsumer::ChannelPressure(uchar channel, uchar pressure, bigtime_t time)
{
port->SprayChannelPressure(channel, pressure, B_NOW);
}
//-----------------
void BMidiPortConsumer::PitchBend(uchar channel, uchar lsb, uchar msb, bigtime_t time)
{
port->SprayPitchBend(channel, lsb, msb, B_NOW);
}
//-----------------
void BMidiPortConsumer::SystemExclusive(void *data, size_t dataLength, bigtime_t time)
{
port->SpraySystemExclusive(data, dataLength, B_NOW);
}
//-----------------
void BMidiPortConsumer::SystemCommon(uchar statusByte, uchar data1, uchar data2, bigtime_t time)
{
port->SpraySystemCommon(statusByte, data1, data2, B_NOW);
}
//-----------------
void BMidiPortConsumer::SystemRealTime(uchar statusByte, bigtime_t time)
{
port->SpraySystemRealTime(statusByte, B_NOW);
}
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
//----------------------------------------
+42
View File
@@ -0,0 +1,42 @@
/**
* @file MidiPort.h
*
* @author Jerome Leveque
*/
//----------------------------------------
#ifndef _MIDI_PORT_CONSUMER_H
#define _MIDI_PORT_CONSUMER_H
#include <MidiConsumer.h>
#include <MidiPort.h>
//----------------------------------------
class BMidiPortConsumer : public BMidiLocalConsumer
{
public:
BMidiPortConsumer(BMidiPort *toPort, const char *name = NULL);
void NoteOff(uchar channel, uchar note, uchar velocity, bigtime_t time);
void NoteOn(uchar channel, uchar note, uchar velocity, bigtime_t time);
void KeyPressure(uchar channel, uchar note, uchar pressure, bigtime_t time);
void ControlChange(uchar channel, uchar controlNumber,
uchar controlValue, bigtime_t time);
void ProgramChange(uchar channel, uchar programNumber, bigtime_t time);
void ChannelPressure(uchar channel, uchar pressure, bigtime_t time);
void PitchBend(uchar channel, uchar lsb, uchar msb, bigtime_t time);
void SystemExclusive(void *data, size_t dataLength, bigtime_t time);
void SystemCommon(uchar statusByte, uchar data1,
uchar data2, bigtime_t time);
void SystemRealTime(uchar statusByte, bigtime_t time);
private:
BMidiPort *port;
};
//----------------------------------------
#endif _MIDI_PORT_CONSUMER_H
@@ -3,7 +3,7 @@ Author: Jerome LEVEQUE
Email: [email protected] Email: [email protected]
*/ */
#include "MidiPlayerView.h" #include "MidiPlayerView.h"
#include "Scope.h" //#include "Scope.h"
#include "Activity.h" #include "Activity.h"
#include <StringView.h> #include <StringView.h>
@@ -154,12 +154,12 @@ Activity *view = NULL;
RemoveAll(fViewBox); RemoveAll(fViewBox);
break; break;
//-------------- //--------------
case VIEW_CHANGE_TO_SCOPE : /* case VIEW_CHANGE_TO_SCOPE :
RemoveAll(fViewBox); RemoveAll(fViewBox);
fViewBox->AddChild(new Scope(BRect(10, 25, 340, 340))); fViewBox->AddChild(new Scope(BRect(10, 25, 340, 340)));
break; break;
//-------------- //--------------
case VIEW_CHANGE_TO_ACTIVITY : */ case VIEW_CHANGE_TO_ACTIVITY :
RemoveAll(fViewBox); RemoveAll(fViewBox);
msg->FindPointer("View", (void**)&view); msg->FindPointer("View", (void**)&view);
fViewBox->AddChild(view); fViewBox->AddChild(view);
@@ -229,7 +229,7 @@ BMessage *msg = NULL;
BMenuItem *item = NULL; BMenuItem *item = NULL;
int32 temp = 0; int32 temp = 0;
Menu = new BPopUpMenu("Sample Rate"); /* Menu = new BPopUpMenu("Sample Rate");
temp = be_synth->SamplingRate(); temp = be_synth->SamplingRate();
msg = new BMessage(CHANGE_SAMPLE_RATE_SYNTH); msg = new BMessage(CHANGE_SAMPLE_RATE_SYNTH);
Menu->AddItem(item = new BMenuItem("11025 Hz", msg)); Menu->AddItem(item = new BMenuItem("11025 Hz", msg));
@@ -303,7 +303,7 @@ BSlider *slider = new BSlider(BRect(5, 100, 275, 130), NULL, "Volume",
slider->SetValue(temp); slider->SetValue(temp);
slider->SetLimitLabels("Min", "Max"); slider->SetLimitLabels("Min", "Max");
aView->AddChild(slider); aView->AddChild(slider);
} */}
//---------------------------------------------------------- //----------------------------------------------------------
//---------------------------------------------------------- //----------------------------------------------------------
@@ -17,7 +17,7 @@ Email: [email protected]
#include <File.h> #include <File.h>
#include <MidiStore.h> #include <MidiStore.h>
#include <MidiPort.h> #include <MidiPort.h>
#include <MidiSynth.h> //#include <MidiSynth.h>
#include <MidiSynthFile.h> #include <MidiSynthFile.h>
//---------------------------------------------------------- //----------------------------------------------------------
@@ -210,7 +210,7 @@ entry_ref ref;
PostMessage(msg, fStandartView); PostMessage(msg, fStandartView);
break; break;
//-------------- //--------------
case OUTPUT_CHANGE_TO_BEOS_SYNTH : /* case OUTPUT_CHANGE_TO_BEOS_SYNTH :
if (fOutputType == BEOS_SYNTH) if (fOutputType == BEOS_SYNTH)
break; break;
fOutputType = BEOS_SYNTH; fOutputType = BEOS_SYNTH;
@@ -244,7 +244,7 @@ entry_ref ref;
PostMessage(msg, fStandartView); PostMessage(msg, fStandartView);
break; break;
//-------------- //--------------
case OUTPUT_CHANGE_TO_MIDIPORT : */ case OUTPUT_CHANGE_TO_MIDIPORT :
if (fOutputType == MIDIPORT) if (fOutputType == MIDIPORT)
break; break;
fOutputType = MIDIPORT; fOutputType = MIDIPORT;
@@ -280,14 +280,14 @@ entry_ref ref;
PostMessage(msg, fStandartView); PostMessage(msg, fStandartView);
break; break;
//-------------- //--------------
case VIEW_CHANGE_TO_SCOPE : /* case VIEW_CHANGE_TO_SCOPE :
if (fDisplayType == SCOPE) if (fDisplayType == SCOPE)
break; break;
fDisplayType = SCOPE; fDisplayType = SCOPE;
PostMessage(msg, fStandartView); PostMessage(msg, fStandartView);
break; break;
//-------------- //--------------
case VIEW_CHANGE_TO_ACTIVITY : */ case VIEW_CHANGE_TO_ACTIVITY :
if (fDisplayType == ACTIVITY) if (fDisplayType == ACTIVITY)
break; break;
fDisplayType = ACTIVITY; fDisplayType = ACTIVITY;
@@ -422,7 +422,7 @@ entry_ref ref;
//-------------- //--------------
//Message from the BeOS Synth //Message from the BeOS Synth
//-------------- //--------------
case CHANGE_BEOS_SYNTH_FILE: /* case CHANGE_BEOS_SYNTH_FILE:
if (fOutputFilePanel) if (fOutputFilePanel)
{ {
msg->FindRef("refs", &fOutputFile); msg->FindRef("refs", &fOutputFile);
@@ -545,7 +545,7 @@ entry_ref ref;
//-------------- //--------------
//For the drag and drop function //For the drag and drop function
//-------------- //--------------
case B_SIMPLE_DATA : //A file had been dropped into application */ case B_SIMPLE_DATA : //A file had been dropped into application
if (msg->FindRef("refs", &ref) == B_OK) if (msg->FindRef("refs", &ref) == B_OK)
{ {
message = BMessage(INPUT_CHANGE_TO_FILE); message = BMessage(INPUT_CHANGE_TO_FILE);