Expand the metadata of flac, now you can read the STREAMIN block#106
Expand the metadata of flac, now you can read the STREAMIN block#106Mitsuha wants to merge 1 commit intodhowden:masterfrom
Conversation
There was a problem hiding this comment.
Thank you for the change!
I think you might have exported metadataFLAC -> MetadataFLAC so that you could access the extra information?
Instead, can you add the information in to the Raw() output? You should then be able to keep the public API the same for now.
You can create some keys in Raw for you new values (FLACSampleRate, FLACTotalSamples and FLACDuration will make sure they shouldn't clash with the general output from vorbis).
Once we have a handful of types supporting Duration etc we can do something about the interface. I suspect that it might be nicer to create a new interface so that the remaining implementations don't return empty values.
| // FLAC block types. | ||
| const ( | ||
| // Stream Info Block 0 | ||
| StreamInfoBlock blockType = 0 |
There was a problem hiding this comment.
This should be unexported (like the rest of the enum values).
| } | ||
|
|
||
| type metadataFLAC struct { | ||
| type MetadataFLAC struct { |
There was a problem hiding this comment.
This should remain unexported (we don't want to widen the surface area of the API)
Added more metadata fields for FLAC and made
MetadataFLACpublic.This is the first commit, next I will add more fields for formats like mp3, MP4, OGG, etc. Once everything is done, I will add a Duration interface to
type Metadata interface