📜 ⬆️ ⬇️

Music in KolibriOS: full review and latest news


How cool to work while listening to music! I launched a playlist, it plays, and you go about your business. But here's the ill luck - in modern music players all the music libraries began to be used without a doubt, without them you will not be able to open the file normally without having previously scanned the entire hard disk. I'm a person from the 90s, and I have the “Muz.one” folder on the hard, someone has “Music”, “Muzychka”, some (let's not point fingers) have “Junk” or “100% disassemble” this year". All I want is to go to the folder with audio recordings, run the file and enjoy the music! I don’t need a combine that “catalogs”, “synchronizes” and brews coffee - I need an MP3 player: simple, fast and easy. Therefore, I tried to write this for my favorite operating system Hummingbird.

Review of existing applications


Since The most popular audio file format is MP3 and most of the music on my computer is in this format, let's look at existing audio players with its support for Hummingbirds:

  1. AC97SND - comes with the distribution, is in / rd / 1 / media /. The name of the program is due to the fact that previously it supported only audio cards of the AC97 standard, now they also added support for the HD Audio codec.
    Pros : support for MP3, WAV, XM, has a playlist and supports downloading them in M3U format, the progress bar of the audio recording is displayed, volume control, looping of the composition.
    Cons : computer freezes when playing many audio recordings.
  2. Listplay is a playlist player (M3U, LAP, ASF) via AC97SND. While writing the article, I fixed the bug in the listplay - the path to ac97snd was incorrect. Now AC97SND starts when a track is selected, but the music still does not play.
  3. MiniMP3 - MPEG Audio Layer III decoder, a program that does not have a window (plays music in the background), also exists as a library for playing MP3 files. It plays tolerably, sometimes it can not “chew” the file and then a crash is heard from the speakers.


As you can see, there are few audio players in the Hummingbird, and they all have their significant drawbacks. Even turning a blind eye to the fact that Listplay and AC97SND cause the system to hang, their appearance is poor and there is no possibility to open the folder with the music: you need to either open one file at a time, or have a playlist ready; MiniMP3 doesn't have a window in principle.

Hey, Pixie!


There is a problem - you need a solution. And now, after a week of development, I’m ready to introduce Pixie to the world (somewhere here fanfare sounded, trills rattled and rose petals fell from the sky).
Pixie is an audio player, or rather a front-end for a program that plays sound (MiniMP3). Do not worry - everything is very simple: Pixie downloads a list of files, controls the start of playback and stopping, volume - everything is just like a regular player, but does not play audio recordings itself, another process does not have a window, but you can see it in the task manager , eg. The shadow process (back-end) for playing music can be any program or library - MiniMP3 / AC97SND / LibFlac / etc. What is the plus of this approach:
  1. separation of the functional from the GUI and the ability to fully concentrate on the development of the player (i.e. front-end GUI)
  2. You can connect any background player audio files; for different file formats - different players
  3. if the background process of the player inadvertently falls, nothing terrible will happen, the player will be alive and healthy and take care of this by opening the next song

So, as we can see, there are obvious advantages from such an approach. Let's look at the functionality of Pixie.
The window can be of three modes: normal, collapsed into the header and compact. Two themes are available to choose from: light and dark, you can apply them by pressing F1 or F2, respectively.

When you first start the player will ask whether to assign it as the default MP3 player. In case of refusal, the player will still be available through the menu “Open with” in file managers.
Clicking with the right mouse button on the title will hide the playlist, and on the list pane will show a small help.

At the moment there is no “Open file” function or folder in the player; instead, you need to go to the folder from the file manager and run the song from there. There is also no possibility to edit the list, in version 1.0 this functionality is not provided, but it will definitely appear in future versions.
All program settings are saved after the program is restarted: the position and type of the window, the selected theme. After closing the program and opening again, the window appears in the same place where it was before closing, the window type and theme are saved. The folder opened during the last launch will start playing.
In case the file could not start correctly, the player will start playing the next song in the list. When a new song starts playing, a corresponding message is displayed.

Interesting facts about Pixie:
  1. The first working prototype of the program was written in one day! On Saturday from 9 am to 2 am with breaks for food. Already this version could be used comfortably, the subsequent revision lasted for a week and a half.
  2. the name does not come from a pixel, as you might think, but from a group of Pixies, a fan of which I have long been. It turns out the word game "Pixie Player" can be translated as a member (guitarist) of the group Pixie.

')

Volume - system volume control


Especially for Pixie, the program @Volume was written - a system-wide volume mixer, by e-andrew (@ var-log, I mean I) (Andrey Krasnobaev).
Management: hotkeys in the system: Ctrl + Alt + Left (lower volume) and Ctrl + Alt + Right (higher volume), as well as Ctrl + Alt + Home / Down (silence on / off). When the window is open, the volume also changes using Left, PgDown (volume lower), Right, PgUp (volume higher), Up / Down, Home / End (turn on / off sound).
It is possible to start with parameters and interact with the program through shared memory.



Other programs for working with sound


In addition to the above, there are several other applications that would be worth mentioning.
  1. FPlay is an excellent video player based on the FFmpeg media combine, because it plays everything that you can: mp3, ogg, mkv, avi, mp4, mpeg, flv, webm, vob, mov and this is not a complete list. The version for Hummingbird supports video files with a high bit rate, vertical sync support for Intel video cards (works in conjunction with the corresponding video driver). Keyboard control: space - pause, Enter - full screen mode.
  2. MidAmp - allows you to play Midi-files using the built-in speaker of the computer. It has an interface and hotkeys very similar to WinAmp.
    Del - delete selected tracks;
    z is the previous track;
    x, Enter, double click on the file - play;
    c, Space - pause;
    v - stop;
    b - the next track;
    Esc - close the program;
    m - enable / disable sound;
    PgUp, PgDn - swap 2 adjacent tracks;
    BackSpace - rewind the track to the beginning;
    Home / End - increase / decrease the tone of the melody and play it from the beginning (displayed next to the 'tone' inscription).
  3. CDPlayer , a simple music CD player (* .cdp), is now obsolete.
  4. LibFLAC - FLAC decoder port 1.3.0. Works on the principle of MiniMP3 - the program has no window, plays the FLAC file in the background and closes when finished. It has the following limitations: a decoder (not a library) understands only 16-bit stereo, does not work with files larger than 4 GB.


Almost all popular (and not so) sound card models are supported: AC97SND, HDAudio, Sound Blaster 16, SIS. With a probability of 99% of the sound on your machine will be. A more detailed list of supported audio cards can be found on our wiki .

Conclusion


As you can see, now in Hummingbird there is a wonderful Pixie audio player, a convenient Volume volume control, FPlay video player - all this makes working in Hummingbird even more convenient and enjoyable.

Posted by: Lipatov Kirill 2015
I wish you success and prosperity.

Source: https://habr.com/ru/post/251371/


All Articles