Skip to content

Commit

Permalink
finally made long due seperation between the view/controller code and…
Browse files Browse the repository at this point in the history
… data structures to store current state data - sorta stable? still can't modify mapping parameters

git-svn-id: https://mt.music.mcgill.ca/svn/dot/branches/v2_max5/mappers/qtmapper@2578 e7448968-c8ac-449e-ac06-376e812423d6
  • Loading branch information
rudrarajuv committed Dec 3, 2010
1 parent b3107ae commit 12cdf7f
Show file tree
Hide file tree
Showing 13 changed files with 1,464 additions and 607 deletions.
2 changes: 1 addition & 1 deletion build/build.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

TEMPLATE = app

LIBS += -lgui
LIBS += -lgui -ldata

SOURCES += main.cpp #\
# guithread.cpp
Expand Down
33 changes: 24 additions & 9 deletions build/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,20 @@ void dbDeviceCallbackFunction( mapper_db_device record,

if ( action == MDB_NEW ) {

form->addNewDevice( record->name,
/*form->addNewDevice( record->name,
record->host,
record->port,
false );
*/
form->addNewDevice( record );
mapper_monitor_request_signals_by_name( qtmapper, record->name );
mapper_monitor_request_links_by_name( qtmapper, record->name );
mapper_monitor_request_mappings_by_name( qtmapper, record->name );

} else if ( action == MDB_REMOVE ) {

form->removeDevice( record->name );
//form->removeDevice( record->name );
form->removeDevice( record );

}

Expand All @@ -54,8 +57,8 @@ void dbSignalCallbackFunction( mapper_db_signal record,
void* user ) {

printf( "Form::db_signal_callback_function( ... )\n" );
printf( "name %s type %c is_output %d action %d user %p \n",
record->name, record->type, record->is_output, action, user );
printf( "device_name %s name %s type %c is_output %d action %d user %p \n",
record->device_name, record->name, record->type, record->is_output, action, user );
if ( action == MDB_NEW ) {

form->addNewSignal( record );
Expand All @@ -82,11 +85,18 @@ void dbMappingCallbackFunction( mapper_db_mapping record,
mapper_db_action_t action,
void* user ) {

printf( "Form::db_mapping_callback_function( ... )\n" );
printf( "src_name %s dest_name %s src_type %c dest_type %c action %d user %p \n",
record->src_name, record->dest_name,
record->src_type, record->dest_type,
action, user );
printf( "\nForm::db_mapping_callback_function( ... )\n" );
printf( "src_name %s src_type %c dest_name %s dest_type %c\n",
record->src_name, record->src_type,
record->dest_name, record->dest_type );
printf( "clip_upper %d clip_lower %d\n",
record->clip_max, record->clip_min );
printf( "range.src_min %f range.src_max %f range.dest_min %f range.dest_max %f\n",
record->range.src_min, record->range.src_max,
record->range.dest_min, record->range.dest_max );
printf( "expr %s, mode %d, muted %d\n\n",
record->expression, record->mode, record->muted );

if ( action == MDB_NEW ) {

form->addNewMapping( record );
Expand All @@ -100,6 +110,7 @@ void dbMappingCallbackFunction( mapper_db_mapping record,
}

void wait_local_devices() {

/*
while ( !mdev_ready(qtmapper) ) {
Expand All @@ -112,6 +123,8 @@ void wait_local_devices() {

}



int setup_qtmapper( ) {

qtmapper = mapper_monitor_new();
Expand Down Expand Up @@ -139,6 +152,8 @@ void cleanup_qtmapper( ) {

}



int main( int argc, char *argv[] ) {

if ( setup_qtmapper( ) ) {
Expand Down
4 changes: 2 additions & 2 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ CONFIG += link_pkgconfig

PKGCONFIG += libmapper-0 liblo

INCLUDEPATH += . .. $$PWD/gui
LIBS += -L$$PWD/gui
INCLUDEPATH += . .. $$PWD/gui $$PWD/data
LIBS += -L$$PWD/gui -L$$PWD/data

WARNINGS += -Wall

Expand Down
Loading

0 comments on commit 12cdf7f

Please sign in to comment.