Recent

Author Topic: Sending audio to specific channel or device  (Read 1510 times)

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Sending audio to specific channel or device
« on: February 24, 2022, 12:13:02 pm »
I'm just looking at a project, utilising a Raspberry Pi, where I need to have three separate music tracks being played simultaneously and out of separate channels (assuming that the RPi can handle three separate audio output devices being connected at the same time - that's another question in another forum).

I haven't selected a Lazarus module for this yet, but have seen both UOS and PlaySoundPackage for using to play music files in Lazarus.

Oh, and it needs to be controlled via RS232...but, again, that's a separate issue (and I've already managed to write some code to send/receive data over RS232 in Lazarus).

MarkMLl

  • Hero Member
  • *****
  • Posts: 6688
Re: Sending audio to specific channel or device
« Reply #1 on: February 24, 2022, 12:18:53 pm »
If you select suitable SPI output devices, you should be able to parallel "any number(tm)" on the MOSI/MISO/SCLK signals with separate chip selects on GPIO lines.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Sending audio to specific channel or device
« Reply #2 on: February 24, 2022, 04:02:41 pm »
Cool - I've found innomaker Rasp Pi HiFi DAC Hat PCM5122 on Amazon, which apparently can be stacked with others. So, which Lazarus module would be best for this, and how would I direct a specific file to a specific card?

We'll assume Raspbian OS and Lazarus 2.2 for now, and we're playing WAV files.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6688
Re: Sending audio to specific channel or device
« Reply #3 on: February 24, 2022, 04:10:32 pm »
Can't comment on the details of the software components/libraries. What I was mainly trying to do was highlight that something SPI-based could almost certainly be patched for multiple devices with minimal effort... after all, you'll have the source :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018