Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
auframe: add struct auframe id field
Browse files Browse the repository at this point in the history
This is useful for packing multiple independent frames into one
aubuf and then split them in a separate thread to record multiple tracks.
  • Loading branch information
sreimers committed Dec 15, 2022
1 parent 57aa825 commit 1d04f73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/rem_auframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Audio frame
*/

#include <stdint.h>
#define AUDIO_TIMEBASE 1000000U

/**
Expand All @@ -15,7 +16,8 @@ struct auframe {
uint64_t timestamp; /**< Timestamp in AUDIO_TIMEBASE units */
double level; /**< Audio level in dBov */
uint8_t ch; /**< Channels */
uint8_t padding[7];
uint16_t id; /**< Frame/Channel identifier */
uint8_t padding[5];
};

void auframe_init(struct auframe *af, enum aufmt fmt, void *sampv,
Expand Down
1 change: 1 addition & 0 deletions src/auframe/auframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void auframe_init(struct auframe *af, enum aufmt fmt, void *sampv,
af->srate = srate;
af->level = AULEVEL_UNDEF;
af->ch = ch;
af->id = 0;
}


Expand Down

0 comments on commit 1d04f73

Please sign in to comment.