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.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
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.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
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
- 289 Community Topics
- 2.1K New Ideas
- 535 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 249 SmartSDR for iOS
- 231 SmartSDR CAT
- 172 DAX
- 352 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 26 FLEX-8000 Signature Series
- 850 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 796 Genius Products
- 416 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 103 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 631 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 870 Third-Party Software