Giter Site home page Giter Site logo

Comments (4)

Blenderpics avatar Blenderpics commented on July 18, 2024 2

The easiest way to basicly play anything you want to, is by using audio loopdevices.
Simply load snd-aloop via modprobe (or just add it to /etc/modules), and you are ready to go.
use a terminal to start PiFm:
sudo arecord -fS16_LE -r 44100 -D hw:Loopback,1,0 -c 2 - | sudo ./pi_fm_rds -audio -

then you are free to play whatever you want with whatever program you want, as long as it allows you to specify the audio device you want to use to output to.
for example:
sudo aplay -D hw:Loopback,0,0 "FILE"

if you want to, you can even define the loopdevice as your standard output device, by changing the .asoundrc in your home directory to
# .asoundrc pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }

That way you can even use VLC within X to transmit your audio.

from pifmrds.

danielmoore123 avatar danielmoore123 commented on July 18, 2024

Hi dehy, thanks for the tip, the issue I have is the program cleanly stops working after 2-3 hours, if I re-run the command (without rebooting) it works fine for around the same length of time.
I am using sox like so:

sox -t mp3 http://[stream.url]:8000 -t wav - | sudo ./pi_fm_rds -freq 96.0 -pi FFFF -ps PIRDS -rt 'PI RDS DEMO' -ctl pifm -audio -

What could I be doing wrong? Something is causing it to stop but obviously I would like to fix it so it keeps running until I press stop myself. The above code works for me but quits, is this the stream or the software? Either or, could you maybe help me to fix this please?
Thanks in advance.

from pifmrds.

nickpiggott avatar nickpiggott commented on July 18, 2024

I'm piping like this to keep audio quality as high as possible:

avconv -i $1 -f ogg - | sox -t ogg - -t wav - | sudo pi_fm_rds -audio - -freq $2 -pi $3 -ps $4 -rt $5

I did try modifying the source code of fm_mpx.c to handle the source differently, but the use of sf_read_float makes that refactoring more complicated.

from pifmrds.

linsyking avatar linsyking commented on July 18, 2024

The easiest way to basicly play anything you want to, is by using audio loopdevices. Simply load snd-aloop via modprobe (or just add it to /etc/modules), and you are ready to go. use a terminal to start PiFm: sudo arecord -fS16_LE -r 44100 -D hw:Loopback,1,0 -c 2 - | sudo ./pi_fm_rds -audio -

then you are free to play whatever you want with whatever program you want, as long as it allows you to specify the audio device you want to use to output to. for example: sudo aplay -D hw:Loopback,0,0 "FILE"

if you want to, you can even define the loopdevice as your standard output device, by changing the .asoundrc in your home directory to # .asoundrc pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }

That way you can even use VLC within X to transmit your audio.

I tried this method, but after i started arecord and wanted to use aplay, aplay says "aplay: set_params:1349: Channels count non available".
I don't know how to solve this, can yoou help me?

from pifmrds.

Related Issues (20)

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.