More of a mini app then a project never the less
two versions of a 'meat and potato' audio player
one with un4seen's bass and the other with the
sdl2mixer.
The player has most of the basics in terms of navigation:
press . to play next
press , to play previous
press ] to skip forward 10 secs
press [ to skip backwards 10 secs
press space to pause / play or mute / unmute
press r to restart
press l for linear / shuffle list play
press d for dynamic range compression *note currently not working for sdl
press - to increase volume
press + to decrease volume
press esc to quit
Other basic features are:
- generates a playlist from a folder
- supports most common audio types .mp3, .mp4, .ogg, .wav
. sld2 also supports .flac
- supports playlists .m3u, .pls
- if present cover art is extracted from mp3 and
. written to a thumb file (.jpg or .png)
- ascii interface
- minimal configuration / localization via .ini files
- generate m3u by searching on one tag
. artist, title, album, genre and year
. audioplayer <audiosource> <tag> <tagquery>
. fuzzy search so 195 is equivalent of ?195? or *195*
usage:
audioplayer.exe "path to file or folder"
if a file or path is specified the folder will be scanned for an audio file
if the folder has subfolder(s) these will be scanned for audio files as well.
Intended use is mostly educational but might
be useful to some as bare bones audioplayer.
Tested and compiled on windows 7 / 10 as 32bit app
release (32bit windows):
https://github.com/thrive4/app.fb.audio ... s/releases
https://github.com/thrive4/app.fb.audio ... r/releases
source:
https://github.com/thrive4/app.fb.audioplayer-bass
https://github.com/thrive4/app.fb.audioplayer-sdlmixer
requirements:
bass version
bass.dll (32bit)
https://www.un4seen.com/
sdl2 version
sdl2.dll (32bit) v2.0.22.0
https://www.libsdl.org
and
sdl2_mixer.dll (32bit)v2.6.2.0
https://github.com/libsdl-org/SDL_mixer
Note a number of bindings have been added to
SDL2_mixer.bi
located in <FreeBASIC-1.09.0-gcc-9.3>\inc\SDL2\
Either copy the SDL2_mixer.bi included in the source
from
inc\SDL2\
to
<FreeBASIC-1.09.0-gcc-9.3>\inc\SDL2\
or add this to <FreeBASIC-1.09.0-gcc-9.3>\inc\SDL2\SDL2_mixer.bi
Code: Select all
' added for version sdl2 mixer 2.6.2
declare function Mix_GetMusicArtistTag(byval music as Mix_Music ptr) as const zstring ptr
declare function Mix_GetMusicTitleTag(byval music as Mix_Music ptr) as const zstring ptr
declare function Mix_GetMusicAlbumTag(byval music as Mix_Music ptr) as const zstring ptr
declare function Mix_GetMusicCopyrightTag(byval music as Mix_Music ptr) as const zstring ptr
declare function Mix_MusicDuration(byval music as Mix_Music ptr) as double
declare function Mix_GetMusicPosition(byval music as Mix_Music ptr) as double
declare function Mix_GetMusicVolume(byval volume as long) as long
declare function Mix_MasterVolume(byval volume as long) as long
special thanks:
squall4226 for getmp3tag
see https://www.freebasic.net/forum/viewtop ... um#p149207
rosetta code for compoundtime
https://rosettacode.org/wiki/Convert_se ... #FreeBASIC