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

Commit

Permalink
Updated to v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GrapheneCt authored May 25, 2020
1 parent a62485a commit 529714a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
20 changes: 0 additions & 20 deletions source/audio/flac.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,6 @@ int FLAC_Init(const char *path) {
if (tags)
FLAC__metadata_object_delete(tags);

FLAC__StreamMetadata *picture;
if (config.meta_flac && FLAC__metadata_get_picture(path, &picture, FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER, "image/jpg", NULL, (unsigned)(-1), (unsigned)(-1),
(unsigned)(-1), (unsigned)(-1))) {
metadata.has_meta = SCE_TRUE;
metadata.cover_image = vita2d_load_JPEG_buffer(picture->data.picture.data, picture->length);
FLAC__metadata_object_delete(picture);
}
else if (config.meta_flac && FLAC__metadata_get_picture(path, &picture, FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER, "image/jpeg", NULL, (unsigned)(-1), (unsigned)(-1),
(unsigned)(-1), (unsigned)(-1))) {
metadata.has_meta = SCE_TRUE;
metadata.cover_image = vita2d_load_JPEG_buffer(picture->data.picture.data, picture->length);
FLAC__metadata_object_delete(picture);
}
else if (config.meta_flac && FLAC__metadata_get_picture(path, &picture, FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER, "image/png", NULL, (unsigned)(-1), (unsigned)(-1),
(unsigned)(-1), (unsigned)(-1))) {
metadata.has_meta = SCE_TRUE;
metadata.cover_image = vita2d_load_PNG_buffer(picture->data.picture.data);
FLAC__metadata_object_delete(picture);
}

return 0;
}

Expand Down
20 changes: 0 additions & 20 deletions source/audio/opus.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,6 @@ int OPUS_Init(const char *path) {
sceClibSnprintf(metadata.genre, 31, "%s\n", opus_tags_query(tags, "genre", 0));
}

if ((opus_tags_query_count(tags, "METADATA_BLOCK_PICTURE") > 0) && (config.meta_opus)) {
metadata.has_meta = SCE_TRUE;

OpusPictureTag picture_tag = { 0 };
opus_picture_tag_init(&picture_tag);
const char* metadata_block = opus_tags_query(tags, "METADATA_BLOCK_PICTURE", 0);

int error = opus_picture_tag_parse(&picture_tag, metadata_block);
if (error == 0) {
if (picture_tag.type == 3) {
if (picture_tag.format == OP_PIC_FORMAT_JPEG)
metadata.cover_image = vita2d_load_JPEG_buffer(picture_tag.data, picture_tag.data_length);
else if (picture_tag.format == OP_PIC_FORMAT_PNG)
metadata.cover_image = vita2d_load_PNG_buffer(picture_tag.data);
}
}

opus_picture_tag_clear(&picture_tag);
}

return 0;
}

Expand Down

0 comments on commit 529714a

Please sign in to comment.