Git Product home page Git Product logo

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

Watchers

 avatar  avatar  avatar

phiola's Issues

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.

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?

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.

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

Android

  • Batch conversion (#18)
  • GUI: Easier way to specify output directory (#7)

Windows

  • GUI: complete dark mode

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 %):

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.

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

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

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.

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)

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] 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.

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

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

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 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?

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

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.

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

[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?

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

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!

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 ?

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

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!

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

[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.

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.

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 ?

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.