Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Ramplay.
#1
Tim, with the new Pi4b at 4Gb it begs to have a ramplay option.... Smile 

I recall trialing it way back, with your help, on a Pi2B and allocating 512Mb for the ramdisk...... worked very well but the limitation in ram size was the hold-up there.

Given that MoOde works comfortably on Pi' with 1 Gb this leaves 3Gb for a ramdisk on the Pi4b/4 !
----------
bob
Reply
#2
The question is what benefit is there to using a ramdisk?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
I think the idea is there is less likelihood that the audio stream will interrupted which could theoretically cause the audio output to suffer micro-delays or some such. Does the audio buffer setting in the mpd config still work? That should allow for the same thing though might add some lag to controls.
Reply
#4
Yes it still works but typically it only needs to be bumped if u are using MPD Crossfade. MPD uses its audio buffer to perform crossfading and depending on the length of crossfade requested and the sample rate of the tracks it may need more than its default buffer size as a workspace.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(07-03-2019, 09:44 AM)DRONE7 Wrote: Tim, with the new Pi4b at 4Gb it begs to have a ramplay option.... Smile 

I recall trialing it way back, with your help, on a Pi2B and allocating 512Mb for the ramdisk...... worked very well but the limitation in ram size was the hold-up there.

Given that MoOde works comfortably on Pi' with 1 Gb this leaves 3Gb for a ramdisk on the Pi4b/4 !

One thing that comes to mind is that with 4GB RAM the MPD output buffer size could be increased along with PHP input variable count. This would probably be more efficient for large collections and the moOde Library Tag and Album views :-)

It would take some experimentation in the field cos I don't have a very large collection.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
What Swizzle said Smile 

Would happily volunteer to test.....only hopeless supplier of Pi4 has accepted my payment then said...1 week...July 4th....August 5th....lol... maybe never..... the trials and tribulations of living below the Equator...

I'm hoping to add the HiFiBerry ADC to the Pi4 (if it ever arrives Rolleyes ) and use arecord for lp ripping..
Code:
arecord -d 1680 -c 2 -f S24_3LE -r 96000 --vumeter=stereo /tmp/ramdisk/test.wav

currently using the above on a HP thinclient (single processor with hyper-threading and htop reports max cpu usage at 3-8% so not taxing) and M-Audio Audiophile 2496... (3Gb ram with the /tmp/ramdisk at 2 Gb.....one lp side is about 1.2 Gb)
record to ramdisk then move to desktop pc using sftp... rinse and repeat works fine without errors.

Prior to using the ramdisk I had a sata connected hard-disk but was getting repeated errors and over/under-runs..... given that the Pi4 has usb3 at best then the same or worse could be expected for a local drive ??

Once the Pi4 does arrive I will try aplay from a usb connected drive vs aplay from ramdisk and report.
Then perhaps I can give a use-case for MoOde to use a ramdisk for playback option ......

Wink
----------
bob
Reply
#7
How did you setup a ramdisk in /tmp?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
I followed this tutorial...:-)
https://www.linuxbabe.com/command-line/c...disk-linux

(compare the read/write speeds listed there vs an ssd....quite interesting )
----------
bob
Reply
#9
I wonder if you could just use /run which is a tmpfs (ram file system). I think by default its configured with a size limit of 50% of total RAM. This can be changed by adding a manual entry in /etc/fstab
https://manpages.debian.org/stretch/init....5.en.html

So in theory on a Pi-4/4GB model you could safely let /run have a 3GB size limit.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
That is how we did it last time back when it was /run/shm  though looking at my notes I don't have your instructions for making it appear in MoOde sources tab.... any recollection ?? (I've emailed what I could find from 5 years ago...)
EDIT...remembered ! off to try on a Pi2b for fun and will report...
Edit another... created /run/shm in /etc/fstab then added /run to /etc/default/tmpfs then added the following to smb.conf ...
[Ramplay]
comment = RAMPLAY
path = /run/shm
read only = No
guest ok = Yes

edited library and Ramplay now shows as a NAS entry ( NAS>Ramplay) copied a track to it and updated database then selected and it's playing :-)
Checked in htop and it is definitely playing from ram... memory usage increases as files are copied to ramplay but does not shrink when they're removed whilst running, only on reboot.

Yes a Pi4/4 with 3GB does make it useful Smile It would need some way to auto-update as files are added...
----------
bob
Reply


Forum Jump: