Code Monkey home page Code Monkey logo

phiola's Introduction

phiola

phiola - fast audio player, recorder, converter for Windows, Linux & Android. It can play audio files from your device or remote server, record audio from your microphone or Internet radio stream, process and convert audio into another format, and more. Its low CPU consumption conserves the notebook/phone battery. You can issue commands to phiola via its CLI, TUI, GUI, system pipe and SDK interfaces. Its fast startup time allows using it from custom scripts on a "play-and-exit" or "record-and-exit" basis. It's completely portable (all codecs are bundled) - you can run it directly from a read-only flash drive. It's a free and open-source project, and you can use it as a standalone application or as a library for your own software.

Screenshots of phiola GUI on Android, KDE/Linux and Windows 10: phiola GUI on Android, KDE/Linux and Windows 10

Contents:

Features

  • Play audio: .mp3, .ogg(Vorbis/Opus), .mp4/.mov(AAC/ALAC/MPEG), .mkv/.webm(AAC/ALAC/MPEG/Vorbis/Opus/PCM), .caf(AAC/ALAC/PCM), .avi(AAC/MPEG/PCM), .aac, .mpc; .flac, .ape, .wv, .wav. Note: on Android phiola can play only what your Android supports!
  • Record audio: .m4a(AAC), .ogg, .opus; .flac, .wav
  • Convert audio
  • List/search file meta tags; edit MP3 tags
  • List available audio devices
  • Input: file, directory, HTTP/HTTPS URL, console (stdin), playlists: .m3u, .pls, .cue
  • Command Line Interface for Desktop OS
  • Terminal/Console UI for interaction at runtime
  • GUI for Windows, Linux, Android
  • Instant startup time: very short initial delay until the audio starts playing (e.g. Linux/PulseAudio: TUI: ~25ms, GUI: ~50ms)
  • Fast (low footprint): keeps your CPU, memory & disk I/O at absolute minimum; spends 99% of time inside codec algorithms

Bonus: Convenient API with plugin support which allows using all the above features from any C/C++/Java app!

Features and notes by platform:

Feature Linux Windows Android
GUI
Dark themed GUI ✅ (GTK default) incomplete
Powerful CLI
Simple TUI
Playback formats ✅ all supported ✅ all supported only those supported by OS
Conversion formats ✅ all supported ✅ all supported all supported except .mpc, .ape, .wv
Batch conversion
Record from mic
Record from Internet
Record what you hear ✅ (PulseAudio)
Requirements glibc-2.31(AMD64), glibc-2.36(ARM64) Windows 7 Android 6
HW Requirements AMD64, ARM64 AMD64 ARM64, ARM(incomplete)

Although not officially supported, phiola should build fine for macOS, FreeBSD and Windows XP after tweaking the build script.

See also: phiola Architecture.

Install

Linux

  • Unpack the archive somewhere, e.g. to ~/bin:

     mkdir -p ~/bin
     tar xf phiola-VERSION-linux-amd64.tar.zst -C ~/bin
  • Create a symbolic link:

     ln -s ~/bin/phiola-2/phiola ~/bin/phiola
  • Optionally, add phiola app launcher to KDE Applications:

     cp ~/bin/phiola-2/mod/gui/phiola.desktop ~/.local/share/applications

    Then edit Exec= and Icon= rows in ~/.local/share/applications/phiola.desktop if necessary.

Windows

  • Unpack the archive somewhere, e.g. to C:\Program Files
  • Add C:\Program Files\phiola-2 to your PATH environment
  • Optionally, create a desktop shortcut to phiola-gui.exe

Android

Install from IzzyOnDroid:

Or install .apk manually:

  • To be able to install .apk you need to enable "Allow installation from unknown sources" option in your phone's settings (you can disable it again after installation)
  • Tap on .apk file to install it on your phone

Or you can install .apk file from the PC connected to your phone with adb install.

How to Use CLI

Important: enclose in quotes the file names containing spaces or special characters, e.g.: phiola play "My Music"; phiola play "My Recordings" -include "*.wav".

Play:

# Play files, directories and URLs
phiola play file.mp3 *.flac "My Music" http://server/music.m3u
# or just
phiola file.mp3 *.flac "My Music" http://server/music.m3u

# Play all files within directory in random order and auto-skip the first 20 seconds from each track
phiola "My Music" -random -seek 0:20

# Play on Linux directly via ALSA (and not PulseAudio)
phiola file.mp3 -audio alsa

# Play Internet radio and save the tracks as local files.
# These files will be named automatically using the meta data sent by server.
phiola http://server/stream -tee "@artist - @title.mp3"

# Play MP3 audio via HTTP and convert to a local 64-kbit/sec AAC file
phiola http://server/music.mp3 -dup @stdout.wav | phiola convert @stdin -aac_q 64 -o output.m4a

While audio is playing, you can control phiola via keyboard. The most commonly used commands are:

Key Action
Space Play/Pause
Right Arrow Seek forward
n Play next track
p Play previous track
q Quit
h Show all supported commands

Record:

# Record from the default audio device until stopped
phiola record -o audio.flac

# Record for 1 minute, then stop automatically
phiola record -o audio.flac -until 1:0

# Record and set meta data
phiola record -meta "artist=Great Artist" -o audio.flac

# Record to the automatically named output file
phiola record -o @[email protected]

# Record with a specific audio format
phiola record -aformat int16 -rate 48000 -channels 2 -o audio.flac

# Record what is currently playing on your system ("what you hear")
# * WASAPI:
phiola record -loopback -o audio.flac
# * PulseAudio:
phiola record -dev `phiola dev list -f Monitor -n` -o audio.flac

# Start recording in background, then stop recording from another process:
#   Step 1: record while listening for system-wide commands
phiola -Background record -o audio.flac -remote
#   Step 2: send 'stop' signal to the phiola instance that is recording audio
phiola remote stop

# Record and split the output files by 1 hour
phiola record -split 1:00:00 -o @[email protected]

# Record and pass the audio through Dynamic Audio Normalizer filter
phiola record -danorm 'frame 500 size 15' -o audio.flac

# Record and pass the audio to another program
phiola record -o @stdout.wav | your_program

Note: the output audio format is chosen automatically by the file extension you specify.

Note: it's not required to always type the whole name of a command or an option - you may type just its prefix (enough for phiola to recognize it), e.g. instead of phiola record -aformat int16 you may type phiola rec -af int16.

Convert:

# Convert
phiola convert audio.flac -o audio.m4a

# Convert with parameters
phiola convert file.mp3 -aformat int16 -o file.wav
phiola convert file.wav -vorbis_q 7 -o file.ogg
phiola convert file.wav -rate 48000 -aac_q 5 -o file.m4a

# Convert multiple files from .wav to .flac
phiola convert *.wav -o .flac

# Convert all .wav files inside a directory,
#  preserving the original file names and file modification time
phiola convert "My Recordings" -include "*.wav" -o @filepath/@filename.flac -preserve_date

# Copy (without re-encoding) MP3 audio region from 1:00 to 2:00 to another file
phiola convert -copy -seek 1:0 -until 2:0 input.mp3 -o output.mp3

# Extract (100% accurately) several tracks from a .cue file
phiola convert input.cue -tracks 3,7,13 -o "@tracknumber. @artist - @title.flac"

# Increase .wav file's volume by 6 dB
phiola convert file.wav -gain 6 -o file-louder.wav

Note: the output audio format is chosen automatically by the file extension you specify.

Show file info:

# Show meta info on all .wav files inside a directory
phiola info "My Recordings" -include "*.wav"

# Show meta info including all tags
phiola info -tags file.mp3

# Search for the .mp3 files containing a specific tag
phiola info -tags -inc "*.mp3" . | grep -B10 "Purple Haze"

# Analyze and show PCM info
phiola info -peaks file.mp3

Other use-cases:

# List all available audio playback and recording devices
phiola device list

# Replace/add MP3 tags in-place
# WARNING: please test first before actually using on real files (or at least make backups)!
phiola tag -m "artist=Great Artist" -m "title=Cool Song" file.mp3

# Create a playlist from all .mp3 files in the directory
phiola list create "My Music" -include "*.mp3" -o my-music.m3u

# Sort entries (by file name) in all playlists in the current directory
phiola list sort *.m3u

# Automatically correct the file paths inside playlist (e.g. after some files were moved)
phiola list heal Music/playlist.m3u

Currently supported commands:

Command Description
convert Convert audio
device List audio devices
gui Start graphical interface
info Show file meta data
list Process playlist files
play Play audio
record Record audio
remote Send remote command
tag Edit .mp3 file tags

For the details on each command you can click on the links above or execute phiola COMMAND -h on your PC.

How to Use GUI

Start phiola GUI:

  • On Windows: via phiola-gui.exe

  • On Linux:

     phiola gui

Then add some files to playlist via drag-n-drop from your File Manager, or via List->Add menu command.

Bonus: you can modify the appearance by editing the GUI source file: phiola-2/mod/gui/ui.conf. You can also modify the text by editing language files, e.g. phiola-2/mod/gui/lang_en.conf. Restart phiola GUI after you make changes to those files.

100% Portable Mode

By default, phiola GUI saves and restores its state (including your playlists) on each restart at these locations:

  • Windows: %APPDATA%\phiola
  • Linux: $HOME/.config/phiola

But in case you don't want this, then just create an empty [phiola directory]/mod/gui/user.conf file. As long as this file is present, phiola GUI will store its state there, and it won't touch anything inside your user directory.

How to Use on Android

First time start:

  • Run phiola app
  • Tap on Explorer tab
  • Android will ask you to grant/deny permissions to phiola. Allow to read your storage files.
  • Tap on the music file you want to listen
  • Or long-press on the directory with your music, it will be added to the playlist; tap Play
  • Tap on Playlist tab to switch the view to your playlist

How to Use SDK

The best example how to use phiola software interface is to see the source code of phiola executor in src/exe, e.g. src/exe/play.h contains the code that adds input files into a playlist and starts the playback.

  • src/phiola.h describes all interfaces implemented either by phiola Core or dynamic modules
  • android/.../Phiola.java is a Java interface
  • src/track.h contains internal declarations for a phiola track, and you'll need it only if you want to write your own filter

A short description of how phiola works:

  • User starts phiola app - the top-level module, which I call Executor, starts running.
  • Executor loads Core module that provides access to all phiola's functions.
  • Executor waits (if in graphical mode) and analyzes the user's command and decides what to do next.
  • Most commonly (i.e. for audio playback), Executor prepares the queue of tracks and starts the playback.
  • A Track represents a single job (a single file) and consists of several Filters linked together to form a conveyor. While a track is running, Core consistently calls its Filters, going forth and back through the conveyor until all Filters complete their job. Several Tracks can run in parallel.
  • A Filter is a piece of code located inside a Module, and it performs a single task on a particular Track.
  • A Module is a file (.so/.dll), it may contain one or several Filters, and it provides direct access for them to Executor, Core or other Modules. All necessary Modules are loaded on-demand while the Tracks are running.
  • Before being started, each Track is assigned to a Worker. A Worker is a system thread (a logical CPU core) that actually executes the Filters code.
  • When a Track is being started, stopped or updated, Executor's own Filters get called, so it can report the current status back to the user.

External Libraries

phiola uses modified versions of these third party libraries: libALAC, libfdk-aac, libFLAC, libMAC, libmpg123, libmpc, libogg, libopus, libvorbis, libwavpack, libsoxr, libzstd, libDynamicAudioNormalizer. And these unmodified libraries: openssl. Many thanks to their creators for the great work!!! Please consider their licenses before commercial use. See contents of alib3/ for more info.

Additionally:

  • ffbase library and ffsys interface make it easy to write high level cross-platform code in C language
  • avpack library provides multimedia file read/write capabilities
  • ffaudio interface provides cross-platform audio I/O capabilities
  • ffgui - cross-platform GUI
  • netmill provides network capabilities

Build

Build Instructions

Bug report

If you encounter a bug, please report it via GitHub Issues. When filing a bug report try to provide enough information that can help the developers to understand and fix the problem.

When using CLI, additional debug messages may help sometimes - just add -D after phiola when executing a command, e.g.:

phiola -D play file.mp3

With phiola on Android, there's a button in "About" screen that will save system logs to a file. It will contain the necessary information about the last time phiola crashed, for example.

Why use phiola

phiola is not (and most likely will never be) a competitor to large commercial projects such as Winamp, but there are a few points where phiola is better:

  • phiola and all its dependencies are 100% open-source. This means that you don't run some private and potentially insecure code on your electronic hardware, especially when a music player is running on your computer/phone for 8-14 hours a day.

  • phiola is very flexible, it can easily accommodate hundreds of different functions, it can even be included as a module into another project. If someone decides to make a coffee machine that should also be able to play music, I'm sure phiola would be the best choice for this job :)

  • phiola uses the minimum possible resources, but at the same time it's powerful and user-friendly. Please check your CPU, memory and storage device usage and compare with popular audio software to see whether it's true. I hope phiola can play its small role in preserving our environment by decreasing power consumption.

License

phiola is licensed under BSD-2. But consider licenses of the third party libraries before commercial use. Playback control icons by Icons8. Translations for Android are powered by Weblate.

phiola's People

Contributors

comradekingu avatar izzysoft avatar stsaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phiola's Issues

Codepage for non-Unicode text

Hello, thanks for the great player.

fmedia had the ability to specify the encoding for non-Unicode text in the fmedia.conf:
# codepage for non-Unicode text: win1251 | win1252

How to do this in phiola?

In songs where tags are specified in win1251, phiola incorrectly displays song titles:
cp1251

Heap-Buffer-Overflow vulnerability at conv.c:68

Descirption

There is a Heap-Buffer-Overflow vulnerability in ./phiola/src/afilter/conv.c:68 which damaged data integrity.

Affected version: v2.0-rc22

see also https://github.com/Helson-S/FuzzyTesting/tree/master/phiola/heap-buffer-overflow-1

Reproduction

run the following command:

phiola convert poc -vorbis_q 7 -o ./file.ogg && rm -f ./file.ogg

Screen-shot

image-20240420005017430

φphiola v2.0-rc22 (linux-amd64)
16:49:15.796 #4008 ERROR  wav-read: *1: file is incomplete

#1 " - " "/home/helson/samba_local/share/phiola/phiola_debug_asan_build/crash_collect/crash2/I1EKN3~5" 0MB 0:00.000 (63 samples) 133956kbps WAVE float32 2147483647Hz mono

[................................................................] 0:00 / 0:00
=================================================================
==4008==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000160 at pc 0x7fcec58c2bf8 bp 0x7ffebeca2560 sp 0x7ffebeca2550
WRITE of size 8 at 0x603000000160 thread T0
    #0 0x7fcec58c2bf7 in arrp_setbuf ../phiola/src/afilter/conv.c:68
    #1 0x7fcec58c34ad in aconv_prepare ../phiola/src/afilter/conv.c:115
    #2 0x7fcec58c363f in aconv_process ../phiola/src/afilter/conv.c:130
    #3 0x7fcec6448880 in trk_filter_run ../phiola/src/core/track.c:256
    #4 0x7fcec64497f1 in track_run ../phiola/src/core/track.c:369
    #5 0x7fcec640d307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #6 0x7fcec6410a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #7 0x7fcec641005e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #8 0x7fcec641053f in zzkq_run ../phiola/src/util/kq.h:236
    #9 0x7fcec6412ae2 in wrk_run ../phiola/src/core/worker.h:106
    #10 0x7fcec6413a4b in wrkx_run ../phiola/src/core/worker.h:204
    #11 0x7fcec6416a41 in phi_core_run ../phiola/src/core/core.c:414
    #12 0x55ab5c4ebb1f in main ../phiola/src/exe/main.c:285
    #13 0x7fcec5629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #14 0x7fcec5629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #15 0x55ab5c4bf9e4 in _start (/home/helson/samba_local/share/phiola/phiola_debug_asan_build/phiola-src/phiola/phiola-2/phiola+0x79e4)

0x603000000164 is located 0 bytes to the right of 4-byte region [0x603000000160,0x603000000164)
allocated by thread T0 here:
    #0 0x7fcec5ab557c in __interceptor_posix_memalign ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:226
    #1 0x7fcec58b98fe in ffmem_align ../ffbase/ffbase/base.h:501
    #2 0x7fcec58c33d2 in aconv_prepare ../phiola/src/afilter/conv.c:112
    #3 0x7fcec58c363f in aconv_process ../phiola/src/afilter/conv.c:130
    #4 0x7fcec6448880 in trk_filter_run ../phiola/src/core/track.c:256
    #5 0x7fcec64497f1 in track_run ../phiola/src/core/track.c:369
    #6 0x7fcec640d307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #7 0x7fcec6410a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #8 0x7fcec641005e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #9 0x7fcec641053f in zzkq_run ../phiola/src/util/kq.h:236
    #10 0x7fcec6412ae2 in wrk_run ../phiola/src/core/worker.h:106
    #11 0x7fcec6413a4b in wrkx_run ../phiola/src/core/worker.h:204
    #12 0x7fcec6416a41 in phi_core_run ../phiola/src/core/core.c:414
    #13 0x55ab5c4ebb1f in main ../phiola/src/exe/main.c:285
    #14 0x7fcec5629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: heap-buffer-overflow ../phiola/src/afilter/conv.c:68 in arrp_setbuf
Shadow bytes around the buggy address:
  0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff8000: fa fa fd fd fd fa fa fa 00 00 04 fa fa fa 00 00
  0x0c067fff8010: 04 fa fa fa 00 00 04 fa fa fa 00 00 00 00 fa fa
=>0x0c067fff8020: fd fd fd fa fa fa fd fd fd fa fa fa[04]fa fa fa
  0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==4008==ABORTING

[Android] Opus recordings sounding like filtered

Opus recordings are sounding more like filtered (noisy) rather than natural. I changed only these few things in the settings:
Channels: Mono
Bitrate: 32 kbps
Sample rate: 48000 hz

I compared its produced Opus sound with other recorders (recforge, record you), but Phiola's output is like filtered or thinned out. I tested other encoder (AAC-LC) sound and it's fine.

Background recording CLI not working

Thanks for this little gem first of all.

I am not getting success with the following command with full paths (I am using it entirely portably):

C:\Users\username\Documents\phiola-2.0.24-windows-x64\phiola-2\phiola.exe -Background record -o C:\Users\username\Desktop\Recording.m4a -remote

Did I miss something? I thought I was following the documentation to a tee:

Appreciate any help you can give.

P.S., it seems that the following works, interestingly:
C:\Users\username\Documents\phiola-2.0.24-windows-x64\phiola-2\phiola.exe -Background -Debug record -o C:\Users\username\Desktop\Recording.m4a -remote

Not sure why.

CLI recording slow start on Linux x86

Hello, I found that recording 2 seconds of audio on Linux takes around 4 seconds in total. Checked on 2 different PCs just to be sure.

time ./phiola record -o test.wav -until 2
gives me

φphiola v2.0.24 (linux-amd64)
15:47:57.360 #3617 INFO   tui: *1: Recording...  Source: int16 44100Hz stereo.  Press "s" to stop.
0:01  [..........] -40dB / -19.40dB  
15:47:59.359 #3617 INFO   wav-write: *1: total samples: 88,200
15:47:59.360 #3617 INFO   file-write: *1: test.wav: written 345KB
./phiola record -o test.wav -until 2  0.01s user 0.01s system 0% cpu 4.016 total

Compared with arecord:
time arecord -t wav -d 2 -r 44100 -f SE_16_LE|> test.wav

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
arecord -t wav -d 2 -r 44100 -f S16_LE  0.01s user 0.01s system 0% cpu 2.242 total
 > test.wav  0.00s user 0.01s system 0% cpu 2.242 total

Problem when playing unsupported files?

Lately, I've noticed some problems when trying to play unsupported files on GUI (like image or text files).

The normal behaviour is that it should display a notification describing the error, and play the next file if possible.

However, after installing newer versions (I think after rc23) there's some issues. On some instances, the program used to freeze and consume a lot of memory. On others, it just exits or doesn't show a notification.

CLI works fine, so it must be an issue with the GUI.

Can't connect to Webradio

First of all, thank you for your great work.
I tried an example from the description but it fails.

phiola http://server/stream -tee "@artist - @title.mp3"

The following command line was entered in the Windows console:

phiola http://mp3channels.webradio.de/chillout -tee "@artist - @title.mp3"

and it ends with an error message

09:49:32.005 #11020 WARN   http-client: *1: connect: (10049) Die angeforderte Adresse ist in diesem Kontext ungültig

I tried with several addresses. With the same result. But the adresses are valid.
Is this an error in the command or in the program?

Track title and tags transfer to car system

I don't know if the title is clear enough but the issue is that if i play tracks with my device connected to my car radio, no info is displayed on car radio display with the exception of track length.
Thanks

File picker instead of written path

The Convert menu gives you these options (first two in the list):

Screenshot_20231225-192610 png

Which needs you write down a file path i suppose ?
First thing, it doesn't tell you which type of path format it accept.
It would also be very welcom to be able to pick a folder/file/path using the file picker instead

Would that be possible ?

Change wording for auto-skip feature

The two auto-skip wptions are great but their wording is a bit wonky.

Auto-Skip track start (sec or %):: this skips the beginning of the tracks right? then it should probably say Auto-Skip track start (sec or %):
And to unify the wording with the followung optiwn, change the other one to Auto-Skip track end (sec or %):

[Android 11, v2.1-rc4] Recorded files are not added to playlist

After doing a recording, the playlist is not updated accordingly. No files are dispayed.
Recording works, albeit not respecting the quality setting (see other issue I'll file). My recording file path contains a space character which is handled correctly.

The playlist file that is generated, /phiola/list1.m3uz looks like this:

(µ/ý =é�#EXTM3U
#EXTINF:-1,  
/storage/emulated/0/phiola/list1.m3uz

(which is not a valid EXTM3U file so I don't recognise the binary bit at the beginning)

On program restart the file list1.m3uz may or may not show up. I tried to edit the list file manually to add an actual recording (including the full file path, see below) and make it a valid EXTM3U file. That did work in a way: after program start, the list still shows list1.m3uz as the only entry yet when tapping on that file name the two files which I had manually edited in show up and can also be played. Yet, on program close, the list file is either being modified in either one of these ways (notably not always the same): changed #EXTINF value (to 8) all else left as is; reverted to its initial state; being binaryfied (compressed?).

Example edit of list1.m3uz that did work:

#EXTM3U
#EXTINF:8,  
/storage/emulated/0/Music/Sound records/rec_20240617_102638.m4a
#EXTINF:8,  
/storage/emulated/0/Music/Sound records/rec_20240617_102727.m4a

Support for external open with

Phiola as an audio player seems to work fine with Internal file picker.

Can you also include a feature so that we can play recorded audio files through phiola from external file managers ?

Heap-Buffer-Overflow vulnerability at pcm_convert.h:513

Descirption

There is a Heap-Buffer-Overflow vulnerability in phiola/src/afilter/pcm_convert.h:513 which damaged data integrity.

Affected version: v2.0-rc22

See also https://github.com/Helson-S/FuzzyTesting/tree/master/phiola/heap-buffer-overflow-2

Reproduction

run the following command:

phiola convert poc -vorbis_q 7 -o ./file.ogg && rm -f ./file.ogg

Screen-shot

image-20240420011116818

φphiola v2.0-rc22 (linux-amd64)

#1 " - " "/home/helson/samba_local/share/phiola/phiola_debug_asan_build/crash_collect/crash2/IFC5M5~2" 0.02MB 0:00.000 (11,025 samples) 176kbps WAVE int16 2147483648Hz mono

[................................................................] 0:00 / 0:00=================================================================
==4236==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000168 at pc 0x7f3ec8e7a4eb bp 0x7fffc50ed630 sp 0x7fffc50ed620
WRITE of size 4 at 0x603000000168 thread T0
    #0 0x7f3ec8e7a4ea in pcm_convert ../phiola/src/afilter/pcm_convert.h:513
    #1 0x7f3ec8e7dc67 in aconv_process ../phiola/src/afilter/conv.c:162
    #2 0x7f3ec8fdf880 in trk_filter_run ../phiola/src/core/track.c:256
    #3 0x7f3ec8fe07f1 in track_run ../phiola/src/core/track.c:369
    #4 0x7f3ec8fa4307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #5 0x7f3ec8fa7a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #6 0x7f3ec8fa705e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #7 0x7f3ec8fa753f in zzkq_run ../phiola/src/util/kq.h:236
    #8 0x7f3ec8fa9ae2 in wrk_run ../phiola/src/core/worker.h:106
    #9 0x7f3ec8faaa4b in wrkx_run ../phiola/src/core/worker.h:204
    #10 0x7f3ec8fada41 in phi_core_run ../phiola/src/core/core.c:414
    #11 0x56468b9b4b1f in main ../phiola/src/exe/main.c:285
    #12 0x7f3ec8c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0x7f3ec8c29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0x56468b9889e4 in _start (/home/helson/samba_local/share/phiola/phiola_debug_asan_build/phiola-src/phiola/phiola-2/phiola+0x79e4)

0x603000000168 is located 0 bytes to the right of 8-byte region [0x603000000160,0x603000000168)
allocated by thread T0 here:
    #0 0x7f3ec90b557c in __interceptor_posix_memalign ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:226
    #1 0x7f3ec8e738fe in ffmem_align ../ffbase/ffbase/base.h:501
    #2 0x7f3ec8e7d3d2 in aconv_prepare ../phiola/src/afilter/conv.c:112
    #3 0x7f3ec8e7d63f in aconv_process ../phiola/src/afilter/conv.c:130
    #4 0x7f3ec8fdf880 in trk_filter_run ../phiola/src/core/track.c:256
    #5 0x7f3ec8fe07f1 in track_run ../phiola/src/core/track.c:369
    #6 0x7f3ec8fa4307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #7 0x7f3ec8fa7a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #8 0x7f3ec8fa705e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #9 0x7f3ec8fa753f in zzkq_run ../phiola/src/util/kq.h:236
    #10 0x7f3ec8fa9ae2 in wrk_run ../phiola/src/core/worker.h:106
    #11 0x7f3ec8faaa4b in wrkx_run ../phiola/src/core/worker.h:204
    #12 0x7f3ec8fada41 in phi_core_run ../phiola/src/core/core.c:414
    #13 0x56468b9b4b1f in main ../phiola/src/exe/main.c:285
    #14 0x7f3ec8c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: heap-buffer-overflow ../phiola/src/afilter/pcm_convert.h:513 in pcm_convert
Shadow bytes around the buggy address:
  0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff8000: fa fa fd fd fd fa fa fa 00 00 04 fa fa fa 00 00
  0x0c067fff8010: 04 fa fa fa 00 00 04 fa fa fa 00 00 00 00 fa fa
=>0x0c067fff8020: fd fd fd fa fa fa fd fd fd fa fa fa 00[fa]fa fa
  0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==4236==ABORTING

Submenues for burger menu options

I see the Android UI is a bit different from that of Linux and Windows, namely, File List Playback Record Convert and Help all have their own submenu.

I guess all Record and Playback options are already visible as i don't see them in the drop-down menu …?
Otherwise, File ande List could have their own menu available like this:
image2
About and Help menues would be available from the tapping the icon on the left, or by tapping the current burger menu if the icon isn't to your liking.

Localization

I'm discovering phiola and finding it is very feature-full ! Some of it is quite specific, and having the text localized might help some users discover its features.

I've used external platforms like Weblate (opensource and self-hostable) and Crowdin (free for opentource projects) and they're éoth quite good for that matter.
I would be able able to provide localization for french :)

But maybe this is out of scope for this project ?

Backward compatibility of CLI switches with Fmedia

Windows 7 x64, Phiola 2.0rc19 (and Fmedia 1.31).

Dear @stsaz,
I am used to listening to multiple files on repeat as follows fmedia 01.flac 02.flac 03.flac --repeat-all. But not only you replaced -- with - in Phiola, but also replaced ...-all with _all which requires pressing Shift to type that underscore. It's painful. Please consider making the CLI switches backwards compatible, or at least similar to the previous ones, if possible.

Flow point exception at conv.c:115

Description

There is a flow point exception in phiola/src/afilter/conv.c:115 which may lead to denial of service.

Affected version: v2.0-rc22

Reproduction

run the following command:

phiola convert poc -vorbis_q 7 -o ./file.ogg && rm -f ./file.ogg

screen-shot

image-20240420004701828

φphiola v2.0-rc22 (linux-amd64)
16:37:05.822 #3915 ERROR  wav-read: *1: file is incomplete

#1 " - " "/home/helson/samba_local/share/phiola/phiola_debug_asan_build/crash_collect/crash3/I10FEH~8" 0MB 0:00.000 (8,192 samples) 2281702kbps WAVE int32 285212928Hz 7.1

[................................................................] 0:00 / 0:00
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3915==ERROR: AddressSanitizer: FPE on unknown address 0x7f85fc085483 (pc 0x7f85fc085483 bp 0x7ffecb28cd80 sp 0x7ffecb28cd40 T0)
    #0 0x7f85fc085483 in aconv_prepare ../phiola/src/afilter/conv.c:115
    #1 0x7f85fc08563f in aconv_process ../phiola/src/afilter/conv.c:130
    #2 0x7f85fcd2a880 in trk_filter_run ../phiola/src/core/track.c:256
    #3 0x7f85fcd2b7f1 in track_run ../phiola/src/core/track.c:369
    #4 0x7f85fccef307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #5 0x7f85fccf2a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #6 0x7f85fccf205e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #7 0x7f85fccf253f in zzkq_run ../phiola/src/util/kq.h:236
    #8 0x7f85fccf4ae2 in wrk_run ../phiola/src/core/worker.h:106
    #9 0x7f85fccf5a4b in wrkx_run ../phiola/src/core/worker.h:204
    #10 0x7f85fccf8a41 in phi_core_run ../phiola/src/core/core.c:414
    #11 0x55b5f5841b1f in main ../phiola/src/exe/main.c:285
    #12 0x7f85fbe29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0x7f85fbe29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0x55b5f58159e4 in _start (/home/helson/samba_local/share/phiola/phiola_debug_asan_build/phiola-src/phiola/phiola-2/phiola+0x79e4)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE ../phiola/src/afilter/conv.c:115 in aconv_prepare
==3915==ABORTING

Record button doesn't do anything

The record button seemingly doesn't do anything for me. If i try to push it nothing happens, i don't get a toast message or any feedback saying anything happened. Is anything happening ?
I did give the mic permissions to the app earlier.

Phiola v2-beta11
Android11
Nokia Ta-1157

Custom recording filename template (Android)

The [Android] filename template seems to currently be hardcoded:

String fname = String.format("%s/rec_%04d%02d%02d_%02d%02d%02d.%s"

It would be helpful if there were a configuration option to modify this for saved recordings. I personally would be fine if it were just a direct setting that modifies exactly this string (I just want 2024-06-20-21-46-40.flac instead of rec_20240620_214640.flac) but implementing something like strftime would probably be better for other users.

(I'm not actually familiar with Java, so I hope everything I've found is correct. Thanks for your time!)

User Projects & User Stories

Got an interesting project that uses phiola? Let others know about it!

This page is for those who use phiola in their projects.
Here you can post the description and links to your projects and scripts.

It may help other users discover some real-world cases of how phiola can be used, as well as help you generate some interest around your project.

Please DO NOT post here questions, feature requests, bug reports, etc.

When recording a long audio, split the output into separate smaller files

Similar to the arecord Linux utility, if the user wants to record a really long audio, allow the user to specify a maximum length per file and have phiola write out multiple files until the entire audio is captured in files. For example, if I want to record 14 hours of audio, and I want each file to be no more than 5 minutes long, I'd specify a maximum file length of 300 seconds, and phiola would write the first 5 minutes to a file ending in -01.wav, then the second 5 minutes to a file ending in -02.wav, and so on until recording is stopped. This could work with the remote option where phiola just keeps writing out files until it gets the remote stop command. Thank you.

[FAEATURE REQUEST] Volume in CLI

I can't find a volume setting in the CLI commands. It is present in the GUI.
Have I overlooked something or is it not implemented there?

Feature Requests

Feature Requests

Playback

Recording

  • Noise gate
  • Dynamically adjust system audio volume if the input level is too quiet or too loud

Conversion

  • Glue (join several files into one)
  • Mix
  • list sort: remove duplicates

GUI

  • Performance: Don't autoload all lists except the selected one
  • Add conversion settings: format, rate, gain
  • Edit file tags
  • Random across all lists
  • Single instance mode
  • Register file associations

Android

  • Record from radio
  • GUI: Easier way to specify output directory (#7)

Windows

  • GUI: complete dark mode

Segment fault caused by write access

Description

There is a segment fault vulnerability caused by write access in phiola/src/afilter/pcm_convert.h:513 which may lead to denial of service.

see also https://github.com/Helson-S/FuzzyTesting/tree/master/phiola/segmentFault-1

Affected version: v2.0-rc22

Reproduction

run the following command:

phiola convert poc -vorbis_q 7 -o ./file.ogg && rm -f ./file.ogg

Screen-shot

image-20240420011601263

φphiola v2.0-rc22 (linux-amd64)

#1 "������者 - 歌曲���稱" "/home/helson/samba_local/share/phiola/phiola_debug_asan_build/crash_collect/crash2/I2ZFI3~5" 0MB 0:00.000 (10,648 samples) 1411kbps WAVE int16 4127239236Hz stereo

[................................................................] 0:00 / 0:00AddressSanitizer:DEADLYSIGNAL
=================================================================
==4280==ERROR: AddressSanitizer: SEGV on unknown address 0x7f97fef4d098 (pc 0x7f96ef6254eb bp 0x7ffddd2dfde0 sp 0x7ffddd2dfc10 T0)
==4280==The signal is caused by a WRITE memory access.
    #0 0x7f96ef6254eb in pcm_convert ../phiola/src/afilter/pcm_convert.h:513
    #1 0x7f96ef628c67 in aconv_process ../phiola/src/afilter/conv.c:162
    #2 0x7f96ef6dd880 in trk_filter_run ../phiola/src/core/track.c:256
    #3 0x7f96ef6de7f1 in track_run ../phiola/src/core/track.c:369
    #4 0x7f96ef6a2307 in fftaskqueue_run ../phiola/src/util/taskqueue.h:123
    #5 0x7f96ef6a5a02 in zzkq_tq_process ../phiola/src/util/kq-tq.h:22
    #6 0x7f96ef6a505e in _zzkq_kev_call ../phiola/src/util/kq.h:208
    #7 0x7f96ef6a553f in zzkq_run ../phiola/src/util/kq.h:236
    #8 0x7f96ef6a7ae2 in wrk_run ../phiola/src/core/worker.h:106
    #9 0x7f96ef6a8a4b in wrkx_run ../phiola/src/core/worker.h:204
    #10 0x7f96ef6aba41 in phi_core_run ../phiola/src/core/core.c:414
    #11 0x556e45c4db1f in main ../phiola/src/exe/main.c:285
    #12 0x7f96ee829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #13 0x7f96ee829e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #14 0x556e45c219e4 in _start (/home/helson/samba_local/share/phiola/phiola_debug_asan_build/phiola-src/phiola/phiola-2/phiola+0x79e4)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../phiola/src/afilter/pcm_convert.h:513 in pcm_convert

Can't play .ogg audio

Phiola on Android can't play *.ogg sound files, ones which I can play with any other music player. Also can't play .shn files, but that isn't a bug because it isn't supported.

Question on permissions

My scanner got a few more checks added recently, and on today's release of your app reported:

! repo/com.github.stsaz.phiola_20016.apk declares risky permission(s): android.permission.READ_EXTERNAL_STORAGE android.permission.MANAGE_EXTERNAL_STORAGE android.permission.RECORD_AUDIO

While RECORD_AUDIO is clear for an audio recorder (and went straight to the "allow-list") and READ_EXTERNAL_STORAGE is explained by the app supporting pre-Lollipop Android versions: why does the app need MANAGE_EXTERNAL_STORAGE?

Thanks in advance for clarification!

Cannot play WAV files

trying to use wav files and i can't get them to work no matter what using phiola. Plays in any other media player just fine, so I'm unsure what could be going on. I am running these through the CLI.

The first file I tried is 353kbps, int16, 22050Hz mono, no dice

then the second file i tried, something more modern, 2822kbps int32 44100Hz stereo, also wouldn't work.

Both files output the same error:
01:27:11.720 #25968 ERROR wasapi: *1: open(): unsupported format

cmd_NUK25nhlfX

Any help would be massively appreciated!

Install on Raspberry Pi OS?

I'm quite new to SBC and RaspberryPi but I used fmedia for a few years now. I see you provide arm64 version but only as .APK file for Android. Is it possible to get a Linux arm64 version?

Audio player doesn't sync with system controls for Android

For Android 13+ (at least, I don't have any Android devices less than 13), when clicking the play button from the notification audio controller, Phiola will start playing the audio, but will not sync the time elapsed. Say I played a track, and paused it (through Phiola). No problem. When I start it via Phiola, no problem. When I pause it through the system control, it can take an unexpected click or two, but it does pause. When I click play, it takes a lot of clicks, but does eventually play. This is where the problem begins. The audio will play, but Phiola disagrees with that. If I pause the audio, it does stop playing. If I open Phiola, the playback slider (and time elapsed/remaining) have not changed. This becomes more of a problem when the end of the track is reached, because Phiola will not move on to the next one without intervention (not ideal for listening to tunes while driving). This doesn't feel intentional, but if it is, please let me know.

App crashes after adding audio

[Device Model]: Pixel 7
[Android Version]: 14
[Android API Level]: 34
[CPU ABI]: arm64-v8a
[Package Name]: com.github.stsaz.phiola
[Version Name]: 2.0-beta11
[Version Code]: 20011
[Target SDK]: 33
[Min SDK]: 16
[Error Type]: Native
[Crash Time]: 2023-12-22T16:08:32.690
[Stack Trace]:


Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2023-12-22 16:08:32.511653862+0100
Process uptime: 7s
Cmdline: com.github.stsaz.phiola
pid: 12862, tid: 12862, name: ub.stsaz.phiola >>> com.github.stsaz.phiola <<<
uid: 10335
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010
Cause: null pointer dereference
x0 b400007b46adcc98 x1 0000000000000006 x2 00000079ff9e1bbf x3 0000007fccf3d8e8
x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000000
x8 0000000000000000 x9 b400007ab6ab8c70 x10 0000000000000040 x11 0000000000000011
x12 000000000000ffaf x13 16572bc9dda53c53 x14 0000000000000001 x15 00000000ebad6a89
x16 0000000000000001 x17 00000079ff9f4798 x18 0000007cc3ffe000 x19 0000007cc346a000
x20 b400007b26a9e5b0 x21 00000079ff9fa000 x22 000000796bf052c2 x23 b400007a26af56f0
x24 b400007b46adcc98 x25 0000007fccf3daa8 x26 0000007fccf3dad4 x27 00000079ff9fa000
x28 0000007fccf3d9a0 x29 0000007fccf3d900
lr 00000079ff9f47e0 sp 0000007fccf3d8e0 pc 00000079ff9f3d68 pst 0000000020001000
71 total frames
backtrace:
#00 pc 0000000000014d68 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/lib/arm64/libphiola.so (BuildId: fc2d9a4527f206c4655fac03f8931396a09c4b16)
#1 pc 00000000000157dc /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/lib/arm64/libphiola.so (Java_com_github_stsaz_phiola_Phiola_quMeta+68) (BuildId: fc2d9a4527f206c4655fac03f8931396a09c4b16)
#2 pc 0000000000355830 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#3 pc 00000000005bad10 /apex/com.android.art/lib64/libart.so (nterp_helper+5648) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#4 pc 00000000000d42c2 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (com.github.stsaz.phiola.a0.c+54)
#5 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#6 pc 00000000000b813a /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.RecyclerView$s.j+2426)
#7 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#8 pc 00000000000b21d0 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.LinearLayoutManager$c.b+116)
#9 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#10 pc 00000000000b32ac /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.LinearLayoutManager.P0+0)
#11 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#12 pc 00000000000b2d26 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.LinearLayoutManager.C0+106)
#13 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#14 pc 00000000000b3cc2 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.LinearLayoutManager.W+1914)
#15 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#16 pc 00000000000bdbf4 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.RecyclerView.q+76)
#17 pc 00000000005bad58 /apex/com.android.art/lib64/libart.so (nterp_helper+5720) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#18 pc 00000000000bcf74 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.RecyclerView.o+180)
#19 pc 00000000005ba654 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#20 pc 00000000000be79e /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.recyclerview.widget.RecyclerView.onLayout+10)
#21 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#22 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#23 pc 00000000005ba6b0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#24 pc 000000000008b508 /data/app/~~JnyIFhiGuflqiU7C8whVDQ==/com.github.stsaz.phiola-M-k3ksa2xLXFiFPhYUG0_Q==/oat/arm64/base.vdex (androidx.constraintlayout.widget.ConstraintLayout.onLayout+132)
#25 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#26 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#27 pc 0000000000c93c24 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.FrameLayout.layoutChildren+804)
#28 pc 0000000000c93cc8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.FrameLayout.onLayout+56)
#29 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#30 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#31 pc 0000000000c99064 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.LinearLayout.layoutVertical+692)
#32 pc 0000000000c9ba70 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.LinearLayout.onLayout+64)
#33 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#34 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#35 pc 0000000000c93c24 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.FrameLayout.layoutChildren+804)
#36 pc 0000000000c93cc8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.FrameLayout.onLayout+56)
#37 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#38 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#39 pc 0000000000c99064 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.LinearLayout.layoutVertical+692)
#40 pc 0000000000c9ba70 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.LinearLayout.onLayout+64)
#41 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#42 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#43 pc 0000000000c93c24 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.widget.FrameLayout.layoutChildren+804)
#44 pc 0000000000cbb030 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.policy.DecorView.onLayout+64)
#45 pc 0000000000bad9e8 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.View.layout+856)
#46 pc 0000000000c3d9a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewGroup.layout+192)
#47 pc 0000000000bd35dc /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewRootImpl.performLayout+204)
#48 pc 0000000000bd6170 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewRootImpl.performTraversals+9776)
#49 pc 0000000000bdcae0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewRootImpl.doTraversal+192)
#50 pc 0000000000b06854 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.ViewRootImpl$TraversalRunnable.run+52)
#51 pc 0000000000ae9a98 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.Choreographer.doCallbacks+936)
#52 pc 0000000000aea568 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.Choreographer.doFrame+2200)
#53 pc 0000000000b73228 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.view.Choreographer$FrameDisplayEventReceiver.run+72)
#54 pc 000000000096d244 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Handler.dispatchMessage+68)
#55 pc 0000000000970be4 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loopOnce+980)
#56 pc 0000000000970774 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loop+916)
#57 pc 00000000007127dc /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.app.ActivityThread.main+2028)
#58 pc 000000000033f080 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#59 pc 00000000003884dc /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1588) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#60 pc 0000000000387e98 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+32) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#61 pc 000000000031b038 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+120)
#62 pc 0000000000b60bb4 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+116)
#63 pc 0000000000b6b738 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.ZygoteInit.main+3208)
#64 pc 000000000033f080 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#65 pc 00000000004e1ea8 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+728) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#66 pc 000000000057b930 /apex/com.android.art/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+156) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#67 pc 00000000000daca8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+104) (BuildId: 04347e608daaf447fe7dabf331c4ff21)
#68 pc 00000000000e6e2c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+860) (BuildId: 04347e608daaf447fe7dabf331c4ff21)
#69 pc 000000000000254c /system/bin/app_process64 (main+1260) (BuildId: e8762c072e6c37bb8093e340cc42e9f2)
#70 pc 00000000000546e8 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+104) (BuildId: 19c32900d9d702c303d2b4164fbba76c)

[FAEATURE REQUEST] Batch Convert

As a user who regularly converts audio files between formats, it would be very useful for phiola to be able to batch select/convert files.

Musepack (MPC) warnings and errors

Windows 7 x64, Phiola 2.0rc19 (and Fmedia 1.31).

Sample: zivert-mesto.mpc.zip

WARN   mpc-decode: *1: ffmpc_decode(): incomplete block
WARN   mpc-read: *3: mpcread_process(): too small3744
WARN   mpc-read: *3: mpcread_process(): too large2661
ERROR  mpc-read: *4: mpcread_process(): bad SH block. .546
ERROR  mpc-read: *5: mpcread_process(): bad SH block. .540
ERROR  mpc-read: *6: mpcread_process(): bad SH block.
WARN   mpc-decode: *2: ffmpc_decode(): incomplete block
WARN   mpc-read: *2: mpcread_process(): too small block.  Offset: 1849676
WARN   mpc-decode: *2: ffmpc_decode(): incomplete block
WARN   mpc-read: *2: mpcread_process(): too large block.  Offset: 4335989
ERROR  mpc-read: *3: mpcread_process(): bad SH block.  Offset: 20
WARN   mpc-decode: *4: ffmpc_decode(): incomplete block

Arguments -aformat/-rate/-channels are not work

Version

phiola-2.0.24-windows-x64

Test

 ./phiola record -loopback -aformat int16 -rate 16000 -channels 1 -o audio.wav
φphiola v2.0.24 (windows-amd64)
08:33:14.365 #39344 INFO   tui: *1: Recording...  Source: float32 48000Hz stereo.  Press "s" to stop.
0:03  [..........] -40dB / -40dB
08:33:17.984 #39344 INFO   wav-write: *1: total samples: 172,320
08:33:18.002 #39344 INFO   file-write: *1: audio.wav: written 1347KB

Open the recorded wav audio with foobar2000, the sample rate and aformat are not right

image

New MainActivity created but no onDestroy() is called

Android app
Reproducing:

  1. play a audio
  2. switch the task out
  3. click the service notifier to bring out the activity again
    then a new MainActivity is created but the older one's onDestory() is not called
    Why this is bad is the filter grows 1 extra MainActivity every time.

Also there is 2 filters created within Svc, which should not be intented.

this may result in some unexpected bug.

I have tweaked the Svc.java by alot of methods find on the net but no luck.

I'm going to roll out my own fix in my fork. Hope you will also have a look into this problem.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.