controlling dax without control panel

  • 2
  • Question
  • Updated 2 years ago

I have a standalone application for controlling the Flex 6000 series.  I have been unable to figure out how to control the audio output from the radio such that it plays through the PC's audio device without having the DAX control panel running.  Obviously there's some fundamentals here I don't understand.  Can anyone help?

Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like

Posted 3 years ago

  • 2
Photo of WW1SS - Steve

WW1SS - Steve

  • 807 Posts
  • 269 Reply Likes
Remote button top right in Smart SDR will play audio through pc
(Edited)
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like
As mentioned, I'm using a standalone application, not SmartSDR.  I want to control playing audio from my standalone app.
Photo of Mark - WS7M

Mark - WS7M

  • 1350 Posts
  • 503 Reply Likes
Hi Jim,

The radio has a number of different kinds of "audio" that can be sent out.

The first and probably the simplest is the regular receiver audio that Steven mentions can be turned on using the "Remote" button in SSDR.    The way this works is you send the TCP command "
remote_audio rx_on 1".

Sending this command over the TCP control channel to the radio will have it start sending OPUS audio packets over UDP.  You'll need to decode these opus packets and send them to an audio device.

It is not a trivial task but it could be done.
Photo of Tim - W4TME

Tim - W4TME, Customer Experience Manager

  • 9197 Posts
  • 3557 Reply Likes
I changed the category to an API issue to get better visibility by SmartSDR developers.
Photo of Steve - N5AC

Steve - N5AC, VP Engineering / CTO

  • 1057 Posts
  • 1097 Reply Likes
DAX audio is for digital mode applications.  There is also remote audio which is what I think you want.  It is a different protocol and is compressed for best LAN/WAN bandwidth usage.  It requires the use of the open source Opus codec software to function.  If you agree that this is what you are trying to do, we should be able to point you in the direction of documentation that will help you get started.
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like

Steve, yes, that's what I want to do.

Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like
I guess what I need to do is to convert an opus stream to a wav format stream.  Then I could just send it to the SoundPlayer facility.  Has anyone successfully built code to decode an opus stream in Visual Studio?  If so, how'd you do it?  I've tried various things, none of which have worked.
Photo of Tim - W4TME

Tim - W4TME, Customer Experience Manager

  • 9197 Posts
  • 3557 Reply Likes
Jim - DAX does not use the Opus codec; only Remote audio uses Opus.  DAX is sent in an uncompressed format so that it is lossless.
(Edited)
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like
Ok, I understood that.  I think we need to put this to rest.  What I want to do is to provide remote audio capability with my standalone app, so I was incorrect to associate that with DAX in the first place.  I am interested in remote audio.
Photo of Tim - W4TME

Tim - W4TME, Customer Experience Manager

  • 9197 Posts
  • 3557 Reply Likes
I recommend sending an e-mail to devhelp@flexradio.com to ask how to get started.
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 53 Posts
  • 1 Reply Like

Ok.  I'm getting back to this.  I decided to use the opusfile functions documented at https://opus-codec.org/docs/opusfile_api-0.7/index.html.  I downloaded opusfile-v0.9-win32 package and included them in my project.  However, when I reference a function in libopusfile, I get the error 0x8007000B, SystemBadImageFormatException.  It doesn't matter whether I build for x86 or any cpu.

I'm clueless at this point.  Has anyone been able to use opus, especially opusfile?

Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 915 Posts
  • 343 Reply Likes
Usually the BadImageFormat exception does indeed relate to the Platform Target setting (x86, x64, Any CPU, etc).  We use x86 in FlexLib and SmartSDR due to compatibility issues with various libraries.  Note that all of your libraries need to match format.
Photo of Peter K1PGV

Peter K1PGV, Elmer

  • 553 Posts
  • 323 Reply Likes
Decoding Opus data isa PITA. You'll need libopus, but you probably know that. I haven't done it my myself... Though I briefly looked at the Opus API and decided that I didn't want to write a program to retrieve the remote audio,all that badly,

There's a "si,ple" example at http://git.xiph.org/?p=opus.git;a=blo...

Hope that helps some...

Peter
K1PGV