File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/AudioTools/AudioCodecs Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,16 @@ class OSCContainerDecoder : public ContainerDecoder {
170
170
// / Provides the mime type from the encoder
171
171
const char *mime () { return mime_str.c_str (); };
172
172
173
+ // / Provides the sequence number of the last packet
174
+ uint64_t getSequenceNumber () { return seq_no; }
175
+
176
+ // / Adds an new parser callback for a specific address matching string
177
+ void addParserCallback (const char *address,
178
+ bool (*callback)(OSCData &data, void *ref),
179
+ OSCCompare compare = OSCCompare::Matches) {
180
+ osc.addCallback (address, callback, compare);
181
+ }
182
+
173
183
// / Replace the write to the decoder with a callback:
174
184
void setWriteCallback (bool (*write_callback)(uint64_t time, uint64_t seq,
175
185
uint8_t *data, size_t len,
@@ -180,8 +190,6 @@ class OSCContainerDecoder : public ContainerDecoder {
180
190
// / Provide a reference object to the callback
181
191
void setReference (void *ref) { this ->ref = ref; }
182
192
183
- // / Provides the sequence number of the last packet
184
- uint64_t getSequenceNumber () { return seq_no; }
185
193
186
194
protected:
187
195
bool is_active = false ;
You can’t perform that action at this time.
0 commit comments