Aptivi - Stable Manuals
ProjectsWebsiteBlog
BassBoom v0.2.x - Manual
BassBoom v0.2.x - Manual
  • Welcome!
  • Versions
    • Version Release Notes
      • API v1.0 series
      • API v1.1 series
    • Compatibility Notes
  • Installation
    • Installing BassBoom
      • Windows
      • macOS
      • Linux
      • Android
    • Upgrading BassBoom
      • Windows
      • macOS
      • Linux
      • Android
  • Fundamentals
    • What is the music player?
    • What is BassBoom?
    • BassBoom Features
      • BassBoom CLI
      • BassBoom GUI
  • Power Users
    • Using Basolia
      • Devices
      • File
      • Format
      • Lyrics
      • Playback
      • Playlists
      • Albums
      • Radio
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • Checking for open file or URL
  • Checking for radio station
  • Getting current file
  • Opening a music file
  • Opening a music stream
  • Opening a URL file
  • Closing a music file
Edit on GitHub
  1. Power Users
  2. Using Basolia

File

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.

Checking for open file or URL

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)

Checking for radio station

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)

Getting current file

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

public static FileType? CurrentFile(BasoliaMedia? basolia)

Opening a music file

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)

Opening a music stream

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

public static void OpenFrom(BasoliaMedia? basolia, Stream? audioStream)
public static async Task OpenFromAsync(BasoliaMedia? basolia, Stream? audioStream)

To open radio stations, consult the below function as this function doesn't parse radio metadata.

Opening a URL file

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

public static void OpenUrl(BasoliaMedia? basolia, string path)
public static async Task OpenUrlAsync(BasoliaMedia? basolia, string path)

Closing a music file

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.

public static void CloseFile(BasoliaMedia? basolia)