Skip to content

Commit

Permalink
provide read access to mute flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed Nov 16, 2023
1 parent 16cbd6c commit 3972282
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
11 changes: 6 additions & 5 deletions libtascar/include/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ namespace TASCAR {
private:
std::string name;
std::string id;

public:
bool mute;

private:
bool solo;
float meter_tc;
TASCAR::levelmeter::weight_t meter_weight;
Expand Down Expand Up @@ -158,18 +162,15 @@ namespace TASCAR {
std::vector<TASCAR::pos_t> vertices;
};

class face_group_t : public object_t, public TASCAR::Acousticmodel::reflector_t {
class face_group_t : public object_t,
public TASCAR::Acousticmodel::reflector_t {
public:
face_group_t(tsccfg::node_t xmlsrc);
virtual ~face_group_t();
void geometry_update(double t);
void process_active(double t, uint32_t anysolo);
std::vector<TASCAR::Acousticmodel::reflector_t*> reflectors;
//float reflectivity;
//float damping;
std::string importraw;
//bool edgereflection;
//float scattering;
TASCAR::pos_t shoebox;
TASCAR::pos_t shoeboxwalls;
};
Expand Down
15 changes: 2 additions & 13 deletions libtascar/src/osc_scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ int osc_set_object_orientation(const char*, const char* types, lo_arg** argv,
return 1;
}

int osc_route_mute(const char*, const char* types, lo_arg** argv, int argc,
lo_message, void* user_data)
{
route_solo_p_t* h((route_solo_p_t*)user_data);
if(h && (argc == 1) && (types[0] == 'i')) {
h->route->set_mute(argv[0]->i);
return 0;
}
return 1;
}

int osc_route_solo(const char*, const char* types, lo_arg** argv, int argc,
lo_message, void* user_data)
{
Expand Down Expand Up @@ -263,8 +252,8 @@ void osc_scene_t::add_route_methods(TASCAR::osc_server_t* srv,
rs->route = o;
rs->anysolo = &(scene->anysolo);
vprs.push_back(rs);
srv->add_method("/" + scene->name + "/" + o->get_name() + "/mute", "i",
osc_route_mute, rs);
srv->add_bool("/" + scene->name + "/" + o->get_name() + "/mute", &(o->mute),
"mute flag, 1 = muted, 0 = unmuted");
srv->add_method("/" + scene->name + "/" + o->get_name() + "/solo", "i",
osc_route_solo, rs);
srv->add_float("/" + scene->name + "/" + o->get_name() + "/targetlevel",
Expand Down

0 comments on commit 3972282

Please sign in to comment.