gitlabEdit

file-audioFile

File management for BassBoom

The file tools shipped with the BassBoom.Basolia library allows you to open and close a music file so that you can play music and get its information, such as the ID3v2 metadata information.


Usage

You can use the following functions to manage your sound devices:

chevron-rightChecking for open file or URLhashtag

If you want to check to see if there is a file being open in a BasoliaMedia instance, you can use the below function.

public static bool IsOpened(BasoliaMedia? basolia) { }
chevron-rightChecking for radio stationhashtag

If you want to check to see if an open file is a radio station, you can use this function, passing it your BasoliaMedia instance.

public static bool IsRadioStation(BasoliaMedia? basolia) { }
chevron-rightGetting current filehashtag

If you want to get some information about a current file being played, you can use this function.

public static FileType? CurrentFile(BasoliaMedia? basolia) { }
chevron-rightOpening a music filehashtag

To be able to get the most out of the Basolia library, like playing MP3 files, you should call the OpenFile() function, pointing it to a path to a music file.

public static void OpenFile(BasoliaMedia? basolia, string path) { }
chevron-rightOpening a music streamhashtag

To play MPEG streams, excluding radio stations, you should call the OpenFrom() function, pointing it to an open stream.

circle-info

To open radio stations, open a URL file as this function doesn't parse radio metadata.

chevron-rightOpening a URL filehashtag

To play remote files, such as radio stations, you should call the OpenUrl() function, pointing it to a URL that provides an MPEG stream.

chevron-rightClosing a music filehashtag

If you're done playing a music file or performing a specific operation on it, you can call the CloseFile() function to close the file.

Last updated