Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
FlexLib, Radio.CreateAudioStream DAX Audio Encode How To
N7BCP
Member ✭✭
I know just enough to be dangerous with FlexLib. I've managed to use FlexLib to get the radio to give me what I think is IEEE floating point audio via the Radio.CreateAudioStream and an RXDataReady event handler. The handler is being called and I'm getting my array of floats and what I'd like to do is encode this as MP3 (for use in an HTML5 audio element). I'm looking at using the NAudio library to do this (better ideas?). If anyone has tried something like this or has any guidance to offer I would appreciate it. Rather than writing a native client for the Mac, Linux, or mobile device I'm developing a cross platform web based client. MP3 seems to be the best supported audio format for HTML5. I know Flex will be offering Opus but that won't help me. Does anyone know what the samples per second and bit depth of this "DAX Audio" is? A good way to encode this as MP3 in managed code? I've found this awesome article http://www.codeproject.com/Articles/501521/How-to-convert-between-most-audio-formats-in-NET
Thanks
-Larry
Thanks
-Larry
0
Answers
-
I found Steve's notes on the DAX audio spec.0
-
The samples come across as 2 channels of 32-bit floats in the range -1.0 to +1.0 at 24kHz.0
-
Thanks Eric - I've been successfull in getting this stream of floats to play in a web browser using WebSockets and Web Audio API (wrote a server app in C# that takes the UDP packets from the radio and writes them to a WebSockets connected web browser) and it sounds fine. I've split the samples into two channels by alternating each, even numbered samples go to channel one and odd numbered samples go to channel two. Is this how the sample are divided? I may resample to reduce the amount of data going to the client.1
-
Yes exactly. They are interleaved LRLR...0
-
Maybe the wrong thread, but I've at least managed to get some kind of sound. Here is a recording: https://drive.google.com/file/d/0BwuiePIG9KVMc3pWR0FVb3VSRm8/view
I've tried with both channels, speed is fine, but tone frequency is too high. Then isolated one cannel deinterleaved (See screenshot) with the same results.... tone freq is strange.
Olso tried to import the raw bytes with audacity... same sound / [noise]
When I enable SmartSDR Dax on the same channel I hear the sound in sync, but dax has the right tone freq According to https://community.flexradio.com/flexradio/topics/iq_stream_from_6700_radio the Sample Radio of DAX Audio is 48k.
Does anyone see what I'm doing wrong?
0 -
Frank, you might want to consider moving your question to its own thread, rather than commingling your situation with Larry's.0
-
Sorry, dump mistake, I've had two subscriptions to this.stream.RXDataReady... no idea why, but audioStreamAdded might get called twice in 1.6.21??
If anyone still has suggestions, let me know. the following code should work:
1 -
Hi Walt, agreed. Should have done that.0
-
Very nice. Are you connecting to DAX to get the audio or processing the raw audio bits?
james
WD5GWY
0 -
Sorry, I should have read your post better. I see you are using the IEEE audio. I have not tried to work with the audio yet. Still playing with the waterfall.
james
WD5GWY
1 -
Frank,
I don't know of a reason why you would get 2 AudioStreamAdded events, but I have learned that just about anything is possible in software. Please keep us posted if you continue to have this issue.
The code for handling the data looks reasonable to me on a brief look. I noticed that in this screenshot you show using 24kHz, which I think is the correct rate. It looks like you are creating a new BufferedWaveProvider on every RxData event received. This sounds like something you might do once (if _provider is null, perhaps). Some googling says this may be in NAudio, which I am not all that familiar with.
Keep at it and let us know how you're progressing.0
Leave a Comment
Categories
- All Categories
- 260 Community Topics
- 2.1K New Ideas
- 538 The Flea Market
- 7.6K Software
- 6K SmartSDR for Windows
- 139 SmartSDR for Maestro and M models
- 368 SmartSDR for Mac
- 242 SmartSDR for iOS
- 226 SmartSDR CAT
- 175 DAX
- 345 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 45 FLEX-8000 Signature Series
- 859 Maestro
- 45 FlexControl
- 849 FLEX Series (Legacy) Radios
- 807 Genius Products
- 424 Power Genius XL Amplifier
- 280 Tuner Genius XL
- 87 Antenna Genius
- 227 Shack Infrastructure
- 153 Networking
- 410 Remote Operation (SmartLink)
- 130 Contesting
- 642 Peripherals & Station Integration
- 116 Amateur Radio Interests
- 878 Third-Party Software