mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 22:48:01 +02:00
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'end-pos' parameter from the 'Start Playback' CAE command. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8649ee1a0e
commit
cbe8f583b6
@ -24458,3 +24458,6 @@
|
||||
events.
|
||||
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'volume' parameter to the 'Start Playback' CAE command.
|
||||
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed the 'end-pos' parameter from the 'Start Playback' CAE
|
||||
command.
|
||||
|
10
cae/cae.cpp
10
cae/cae.cpp
@ -156,9 +156,9 @@ MainObject::MainObject(QObject *parent)
|
||||
connect(cae_server,SIGNAL(playPositionReq(const SessionId &,int)),
|
||||
this,SLOT(playPositionData(const SessionId &,int)));
|
||||
connect(cae_server,SIGNAL(startPlaybackReq(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int,int)),
|
||||
unsigned,unsigned,int,int,int)),
|
||||
this,SLOT(startPlaybackData(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int,int)));
|
||||
unsigned,unsigned,int,int,int)));
|
||||
connect(cae_server,SIGNAL(playStopReq(const SessionId &)),
|
||||
this,SLOT(stopPlaybackData(const SessionId &)));
|
||||
connect(cae_server,SIGNAL(loadPlaybackReq(int,unsigned,const QString &)),
|
||||
@ -353,8 +353,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,
|
||||
int volume)
|
||||
int start_pos,int speed,int volume)
|
||||
{
|
||||
Driver *dvr=NULL;
|
||||
|
||||
@ -397,7 +396,7 @@ void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
//
|
||||
// Start the transport
|
||||
//
|
||||
if(!dvr->play(cardnum,streamnum,end_pos-start_pos,speed,false,false)) {
|
||||
if(!dvr->play(cardnum,streamnum,0,speed,false,false)) {
|
||||
rda->syslog(LOG_WARNING,
|
||||
"play start failed - session: %s card: %d stream: %d",
|
||||
sid.dump().toUtf8().constData(),cardnum,streamnum);
|
||||
@ -413,7 +412,6 @@ void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
sess->setPortNumber(portnum);
|
||||
sess->setStreamNumber(streamnum);
|
||||
sess->setStartPosition(start_pos);
|
||||
sess->setEndPosition(end_pos);
|
||||
sess->setSpeed(speed);
|
||||
cae_play_sessions[sid]=sess;
|
||||
|
||||
|
@ -77,7 +77,7 @@ class MainObject : public QObject
|
||||
//
|
||||
void startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
int start_pos,int speed,int volume);
|
||||
void playPositionData(const SessionId &sid,int position);
|
||||
void stopPlaybackData(const SessionId &sid);
|
||||
|
||||
|
@ -138,7 +138,6 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
unsigned cardnum;
|
||||
unsigned portnum;
|
||||
int start_pos;
|
||||
int end_pos;
|
||||
int position;
|
||||
int speed;
|
||||
int level;
|
||||
@ -187,7 +186,7 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
//
|
||||
// Playback Operations
|
||||
//
|
||||
if((f0.at(0)=="PY")&&(f0.size()==9)) { // Start Playback
|
||||
if((f0.at(0)=="PY")&&(f0.size()==8)) { // Start Playback
|
||||
serial=f0.at(1).toUInt(&ok);
|
||||
if(ok) {
|
||||
origin.setSerialNumber(serial);
|
||||
@ -199,16 +198,13 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
if(ok&&(portnum<RD_MAX_PORTS)) {
|
||||
start_pos=f0.at(5).toInt(&ok);
|
||||
if(ok&&(start_pos>=0)) {
|
||||
end_pos=f0.at(6).toInt(&ok);
|
||||
if(ok&&(end_pos>=0)&&(end_pos>=start_pos)) {
|
||||
speed=f0.at(7).toInt(&ok);
|
||||
if(ok&&(speed>0)) {
|
||||
volume=f0.at(8).toInt(&ok);
|
||||
if(ok) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,end_pos,speed,volume);
|
||||
was_processed=true;
|
||||
}
|
||||
speed=f0.at(6).toInt(&ok);
|
||||
if(ok&&(speed>0)) {
|
||||
volume=f0.at(7).toInt(&ok);
|
||||
if(ok) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,speed,volume);
|
||||
was_processed=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class CaeServer : public QObject
|
||||
void connectionClosed(const SessionId &sid);
|
||||
void startPlaybackReq(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
int start_pos,int speed,int volume);
|
||||
void playPositionReq(const SessionId &sid,int position);
|
||||
void playPauseReq(const SessionId &sid);
|
||||
void playResumeReq(const SessionId &sid);
|
||||
|
@ -18,6 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rd.h>
|
||||
|
||||
#include "session.h"
|
||||
|
||||
SessionId::SessionId(const QHostAddress &src_addr,uint16_t src_port,int serial)
|
||||
@ -106,11 +108,7 @@ Session::Session(const QHostAddress &addr,uint16_t port,int serial)
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
// d_meter_port=0;
|
||||
// d_meters_enabled=false;
|
||||
d_speed=RD_TIMESCALE_DIVISOR;
|
||||
}
|
||||
|
||||
|
||||
@ -122,31 +120,9 @@ Session::Session(const SessionId &sid)
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
// d_meter_port=0;
|
||||
// d_meters_enabled=false;
|
||||
d_speed=RD_TIMESCALE_DIVISOR;
|
||||
}
|
||||
|
||||
/*
|
||||
Session::Session(const Connection &conn)
|
||||
{
|
||||
d_session_id=SessionId(conn);
|
||||
|
||||
d_session_id=sid;
|
||||
|
||||
d_card_number=-1;
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
d_meter_port=0;
|
||||
d_meters_enabled=false;
|
||||
}
|
||||
*/
|
||||
|
||||
SessionId Session::sessionId() const
|
||||
{
|
||||
@ -202,18 +178,6 @@ void Session::setStartPosition(int pos)
|
||||
}
|
||||
|
||||
|
||||
int Session::endPosition() const
|
||||
{
|
||||
return d_end_position;
|
||||
}
|
||||
|
||||
|
||||
void Session::setEndPosition(int pos)
|
||||
{
|
||||
d_end_position=pos;
|
||||
}
|
||||
|
||||
|
||||
int Session::speed() const
|
||||
{
|
||||
return d_speed;
|
||||
@ -224,28 +188,3 @@ void Session::setSpeed(int speed)
|
||||
{
|
||||
d_speed=speed;
|
||||
}
|
||||
|
||||
/*
|
||||
uint16_t Session::meterPort() const
|
||||
{
|
||||
return d_meter_port;
|
||||
}
|
||||
|
||||
|
||||
void Session::setMeterPort(uint16_t port)
|
||||
{
|
||||
d_meter_port=port;
|
||||
}
|
||||
|
||||
|
||||
bool Session::metersEnabled()
|
||||
{
|
||||
return d_meters_enabled;
|
||||
}
|
||||
|
||||
|
||||
void Session::setMetersEnabled(bool state)
|
||||
{
|
||||
d_meters_enabled=state;
|
||||
}
|
||||
*/
|
||||
|
@ -61,12 +61,10 @@ class Session
|
||||
void setPortNumber(int portnum);
|
||||
int streamNumber() const;
|
||||
void setStreamNumber(int streamnum);
|
||||
// uint16_t meterPort() const;
|
||||
// void setMeterPort(uint16_t port);
|
||||
int startPosition() const;
|
||||
void setStartPosition(int pos);
|
||||
int endPosition() const;
|
||||
void setEndPosition(int pos);
|
||||
// int endPosition() const;
|
||||
// void setEndPosition(int pos);
|
||||
int speed() const;
|
||||
void setSpeed(int speed);
|
||||
// bool metersEnabled();
|
||||
@ -78,10 +76,8 @@ class Session
|
||||
int d_port_number;
|
||||
int d_stream_number;
|
||||
int d_start_position;
|
||||
int d_end_position;
|
||||
// int d_end_position;
|
||||
int d_speed;
|
||||
// uint16_t d_meter_port;
|
||||
// bool d_meters_enabled;
|
||||
};
|
||||
|
||||
|
||||
|
@ -209,7 +209,6 @@
|
||||
<replaceable>card-num</replaceable>
|
||||
<replaceable>port-num</replaceable>
|
||||
<replaceable>start-pos</replaceable>
|
||||
<replaceable>end-pos</replaceable>
|
||||
<replaceable>speed</replaceable>
|
||||
<replaceable>volume</replaceable>
|
||||
</userinput>
|
||||
@ -259,15 +258,6 @@
|
||||
audio PCM data.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable>end-pos</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
The position at which to end play-out, in milliseconds from
|
||||
absolute start of the audio PCM data.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable>speed</replaceable>
|
||||
|
@ -200,15 +200,14 @@ void RDCae::enableMetering(QList<int> *cards)
|
||||
|
||||
|
||||
int RDCae::startPlayback(const QString &cutname,int cardnum,int portnum,
|
||||
int start_pos,int end_pos,int speed,int volume)
|
||||
int start_pos,int speed,int volume)
|
||||
{
|
||||
int serial=cae_next_serial_number++;
|
||||
|
||||
cae_stream_output_levels[serial]=new __RDCaeMeterPoint();
|
||||
SendCommand(QString::asprintf("PY %d %s %d %d %d %d %d %d",
|
||||
SendCommand(QString::asprintf("PY %d %s %d %d %d %d %d",
|
||||
serial,cutname.toUtf8().constData(),
|
||||
cardnum,portnum,start_pos,end_pos,
|
||||
speed,volume));
|
||||
cardnum,portnum,start_pos,speed,volume));
|
||||
emit playStarted(serial);
|
||||
|
||||
return serial;
|
||||
|
@ -54,7 +54,7 @@ class RDCae : public QObject
|
||||
void connectToHost(int timeout_msecs=-1);
|
||||
void enableMetering(QList<int> *cards);
|
||||
int startPlayback(const QString &cutname,int cardnum,int portnum,
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
int start_pos,int speed,int volume);
|
||||
void positionPlay(int serial,int pos);
|
||||
void pausePlayback(int serial);
|
||||
void resumePlayback(int serial);
|
||||
|
@ -392,9 +392,8 @@ void RDMarkerPlayer::buttonPlayData()
|
||||
d_loop_start_length=0;
|
||||
d_cae_serial=rda->cae()->
|
||||
startPlayback(RDCut::cutName(d_cart_number,d_cut_number),
|
||||
d_cards.first(),d_port,
|
||||
d_cursor_position,d_cut_length,RD_TIMESCALE_DIVISOR,
|
||||
100*d_play_gain_spin->value());
|
||||
d_cards.first(),d_port,d_cursor_position,
|
||||
RD_TIMESCALE_DIVISOR,100*d_play_gain_spin->value());
|
||||
Play();
|
||||
rda->cae()->setPlayPortActive(d_cards.first(),d_port,d_cae_stream);
|
||||
// FIXME: Implement variable gain here!
|
||||
@ -411,8 +410,7 @@ void RDMarkerPlayer::buttonPlayFromData()
|
||||
d_cursor_position=d_loop_start_msec;
|
||||
d_cae_serial=rda->cae()->
|
||||
startPlayback(RDCut::cutName(d_cart_number,d_cut_number),
|
||||
d_cards.first(),d_port,
|
||||
d_loop_start_msec,d_cut_length,
|
||||
d_cards.first(),d_port,d_loop_start_msec,
|
||||
RD_TIMESCALE_DIVISOR,100*d_play_gain_spin->value());
|
||||
Play();
|
||||
rda->cae()->setPlayPortActive(d_cards.first(),d_port,d_cae_stream);
|
||||
@ -434,8 +432,7 @@ void RDMarkerPlayer::buttonPlayToData()
|
||||
d_cursor_position=d_loop_start_msec;
|
||||
d_cae_serial=rda->cae()->
|
||||
startPlayback(RDCut::cutName(d_cart_number,d_cut_number),
|
||||
d_cards.first(),d_port,
|
||||
d_loop_start_msec,d_loop_start_msec+d_loop_start_length,
|
||||
d_cards.first(),d_port,d_loop_start_msec,
|
||||
RD_TIMESCALE_DIVISOR,100*d_play_gain_spin->value());
|
||||
d_stop_timer->start(d_loop_start_length);
|
||||
Play();
|
||||
|
@ -548,7 +548,7 @@ void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end,
|
||||
play_audio_point[1],play_timescale_speed);
|
||||
play_serial=play_cae->startPlayback(play_cut->cutName(),play_card,play_port,
|
||||
play_audio_point[0]+pos,
|
||||
play_audio_point[1],play_timescale_speed,
|
||||
play_timescale_speed,
|
||||
start_volume);
|
||||
play_cae->fadeOutputVolume(play_serial,fade_volume,fade_length);
|
||||
play_start_time=QTime::currentTime();
|
||||
|
@ -165,7 +165,6 @@ void RDSimplePlayer::play(int start_pos)
|
||||
play_serial=
|
||||
play_cae->startPlayback(play_cut,play_card,play_port,
|
||||
q->value(0).toInt()+start_pos,
|
||||
q->value(1).toInt(),
|
||||
RD_TIMESCALE_DIVISOR,q->value(2).toInt());
|
||||
// play_cae->setPlayPortActive(play_card,play_port,play_stream);
|
||||
if(play_serial>0) {
|
||||
|
@ -721,9 +721,8 @@ void MainWidget::headButtonData()
|
||||
catch_play_serial=
|
||||
rda->cae()->startPlayback(cut->cutName(),
|
||||
catch_audition_card,catch_audition_port,
|
||||
cut->startPoint(),
|
||||
cut->startPoint()+RDCATCH_AUDITION_LENGTH,
|
||||
RD_TIMESCALE_DIVISOR,cut->playGain());
|
||||
cut->startPoint(),RD_TIMESCALE_DIVISOR,
|
||||
cut->playGain());
|
||||
catch_stop_timer->start(RDCATCH_AUDITION_LENGTH);
|
||||
head_playing=true;
|
||||
delete cut;
|
||||
@ -753,13 +752,10 @@ void MainWidget::tailButtonData()
|
||||
start_pos=cut->startPoint();
|
||||
}
|
||||
// rda->cae()->setPlayPortActive(catch_audition_card,catch_audition_port,catch_audition_stream);
|
||||
// rda->cae()->setOutputVolume(catch_audition_card,catch_audition_stream,catch_audition_port,
|
||||
// 0+cut->playGain());
|
||||
catch_play_serial=
|
||||
rda->cae()->startPlayback(cut->cutName(),
|
||||
catch_audition_card,catch_audition_port,
|
||||
start_pos,cut->endPoint(),
|
||||
RD_TIMESCALE_DIVISOR,cut->playGain());
|
||||
start_pos,RD_TIMESCALE_DIVISOR,cut->playGain());
|
||||
catch_stop_timer->start(RDCATCH_AUDITION_LENGTH);
|
||||
tail_playing=true;
|
||||
delete cut;
|
||||
|
@ -1305,7 +1305,6 @@ void MainObject::StartPlayout(int event)
|
||||
return;
|
||||
}
|
||||
int start=q->value(0).toInt();
|
||||
int end=q->value(1).toInt();
|
||||
delete q;
|
||||
|
||||
//
|
||||
@ -1320,7 +1319,6 @@ void MainObject::StartPlayout(int event)
|
||||
catch_playout_card[deck-129],
|
||||
catch_playout_port[deck-129],
|
||||
start,
|
||||
end, // FIXME: this parameter does nothing!
|
||||
RD_TIMESCALE_DIVISOR,
|
||||
catch_events[event].cutPlayGain());
|
||||
rda->cae()->setPlayPortActive(catch_playout_card[deck-129],
|
||||
|
@ -648,13 +648,12 @@ void RecordCut::recordData()
|
||||
void RecordCut::playData()
|
||||
{
|
||||
int start=rec_cut->startPoint(true);
|
||||
int end=rec_cut->endPoint(true);
|
||||
|
||||
if((!is_recording)&&(!is_playing)&&(!is_ready)) { // Start Play
|
||||
rec_play_serial=
|
||||
rda->cae()->startPlayback(rec_cut->cutName(),
|
||||
rec_card_no[1],rec_port_no[1],
|
||||
start,end,RD_TIMESCALE_DIVISOR,
|
||||
start,RD_TIMESCALE_DIVISOR,
|
||||
rec_cut->playGain());
|
||||
// rda->cae()->setPlayPortActive(rec_card_no[1],rec_port_no[1],rec_stream_no[1]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user