format, layout and channels are duplicative, yes. The number of samples is not. I could add a GstAudioInfo, but that also contains other information that is useless here. I could also not add this information at all here and require the code that uses a GstAudioMeta to also have a GstAudioInfo around, but I feel this is bad practice because the number of channels, for example, is also the size of the offsets array, so they should be together. This last option would also require changing the signature of some methods like gst_audio_buffer_clip().
format, layout and channels are duplicative, yes. The number of samples is not. I could add a GstAudioInfo, but that also contains other information that is useless here. I could also not add this information at all here and require the code that uses a GstAudioMeta to also have a GstAudioInfo around, but I feel this is bad practice because the number of channels, for example, is also the size of the offsets array, so they should be together. This last option would also require changing the signature of some methods like gst_audio_buffer_clip().