YAY
Some checks failed
Build (3DS) / build (push) Failing after 1m13s

This commit is contained in:
2025-12-06 23:47:15 +00:00
committed by GitHub
parent ecac9e6064
commit 285351e982
17 changed files with 800 additions and 26 deletions

View File

@@ -27,10 +27,10 @@ struct errInfo_t
/**
* Return string describing error number. Extends strerror to include some
* custom errors used in ctrmus.
* custom errors used in mice.
*
* \param err Error number.
*/
char* ctrmus_strerror(int err);
char* mice_strerror(int err);
#endif

View File

@@ -1,5 +1,5 @@
/**
* ctrmus - 3DS Music Player
* mice - 3DS Music Player
* Copyright (C) 2016 Mahyar Koshkouei
*
* This program comes with ABSOLUTELY NO WARRANTY and is free software. You are
@@ -9,8 +9,11 @@
#include <3ds.h>
#ifndef ctrmus_main_h
#define ctrmus_main_h
#ifndef mice_main_h
#define mice_main_h
/* Application version */
#define MICE_VERSION "dev20"
/* Default folder */
#define DEFAULT_DIR "sdmc:/"

56
include/metadata.h Normal file
View File

@@ -0,0 +1,56 @@
#ifndef mice_metadata_h
#define mice_metadata_h
#include <stdint.h>
#include <stdbool.h>
#define METADATA_TITLE_MAX 64
#define METADATA_ARTIST_MAX 64
#define METADATA_ALBUM_MAX 64
struct metadata_t
{
char title[METADATA_TITLE_MAX];
char artist[METADATA_ARTIST_MAX];
char album[METADATA_ALBUM_MAX];
/* Album art */
uint8_t* albumArt;
size_t albumArtSize;
int albumArtWidth;
int albumArtHeight;
bool hasAlbumArt;
};
/**
* Extract metadata from an audio file
*
* \param file Path to the audio file
* \param metadata Pointer to metadata structure to fill
* \return 0 on success, -1 on failure
*/
int extractMetadata(const char* file, struct metadata_t* metadata);
/**
* Clear metadata structure and free any allocated memory
*
* \param metadata Pointer to metadata structure to clear
*/
void clearMetadata(struct metadata_t* metadata);
/**
* Display metadata on the top screen
*
* \param metadata Pointer to metadata structure to display
* \param filename Filename to display if no title is available
*/
void displayMetadata(struct metadata_t* metadata, const char* filename);
/**
* Display album art on top screen if available
*
* \param metadata Pointer to metadata structure containing album art
*/
void displayAlbumArt(struct metadata_t* metadata);
#endif

View File

@@ -1,8 +1,8 @@
#include <stdbool.h>
#include <limits.h>
#ifndef ctrmus_playback_h
#define ctrmus_playback_h
#ifndef mice_playback_h
#define mice_playback_h
/* Channel to play music on */
#define CHANNEL 0x08