Teensy3.1 audio shield Volume

Status
Not open for further replies.

Teenfor3

Well-known member
I have downloaded the latest 1.0.6 Arduino and teensyduino 1.20 r6 and all works OK.

But the headset volume was very loud compared to using Arduino 1.0.5 and Teensyduino 1.19

In the older setup I would have had audioShield.volume(20);

Now I have audioShield.volume(0.3):

For roughly the same volume.

I was looking at control_sgtl5000.cpp and see there is AudioControlSGTL5000::volume(float left, float right) for controlling the volume of each channel separately.

I tried using audioShield.volume(0.3, 0.5) and it didn't work...infact no volume at all.

Then I tried .......

float vleft = 0.3;

float vright = 0.5;

audioShield.volume(0.3):

audioShield.volume(vleft, vright);

And it did work, left and right had different volume..............
but I needed the volume with the single parameter first to allow the 2 parameter statement to work....

I was wondering how that is since both are "audioShield.volume"

or maybe this is not the correct way to be using it.....? ? ?
 
Yes, many months ago, the volume scale was changed from 0 - 100 to 0 - 1.0.

You were using a very old beta version. Remember how those beta versions had a strong warning that APIs could change? That's why it was "beta" for so long.

The recent 1.0 release is called "stable" because it's a commitment to keep future versions as compatible as possible.
 
Thanks for reply
I thought I was using Arduino 1.0.5 and Teensyduino 1.19...........things move very fast on this forum !
I downloaded and installed Arduino 1.0.6 and teensyduino 1.20 rc6 yesterday......I see 1.20 is officially launched today.....are there any changes since yesterday. Is what I did yesterday the latest release version, or should I do it again ? ?

Thanks for the link pointing me to the gui......seems very very good...I hadn't seen it before. I looked for the offline version in the audio library and found it....I clicked on the index icon but just got the Welcome info....LHS objects blank with moving "waiting for something ?" icon at top. How do I run the offline version? ?.

One of my questions in the earlier post was how can the same function work, passing 1 parameter on one occasion and passing 2 parameters on another? ?.

audioShield.volume(0.3):

audioShield.volume(vleft, vright);

And the first statement seems to be required before the 2 parameter one works? ?.

Thanks
 
I see 1.20 is officially launched today.....are there any changes since yesterday.

Yes, but only this. Other than that 1 fix, 1.20-rc6 and the final 1.20 are the same.

How do I run the offline version? ?.

I only tested it offline with Firefox on Ubuntu 12.04.

If it doesn't work offline with other browsers and systems, I'm not planning to investigate, but I'll be happy to accept pull requests if anyone else does and come up with a solution.


One of my questions in the earlier post was how can the same function work, passing 1 parameter on one occasion and passing 2 parameters on another? ?.

audioShield.volume(0.3):

audioShield.volume(vleft, vright);

And the first statement seems to be required before the 2 parameter one works? ?.

It's a standard C++ feature.
 
Teensyduino has been averaging about 3 to 4 releases per year, and recently a few release candidates in the 1-2 months before each release.

I want to balance my desire to publish new features quickly with the need for stable releases.
 
Confirming that for MSIE 11 and Chrome 40.0, running index.html from local filesystem does not work while accessing the online version does work. Presumably this relates to the browser security model and localhost. Offline version is OK in Firefox 33.0. I don't have a Mac so can't test Safari.
 
Yes, this forum moves fast.................

I am running "antique" windows XP with default browser Chrome and offline version clicking "Index" icon doesnt work.....online works OK.

Tried windows explorer 8 and Opera 24 on same XP, doesnt work either....just same Welcome info on RHS and rolling icon on LHS of screen.

Tried firefox 32 still running in Windows XP and works...magic..

Thanks Paul for link to C++ tutorial.....will have to do a bit of reading....
 
Maybe someone who's good with Javascript and non-Firefox browsers might take a look? Anyone reading this know such things?!

For anyone coming into this at this reply, just open arduino-1.0.6/libraries/Audio/gui/index.html to run the design tool locally. It'd be nice to get this working on other browsers, but I'm going to keep focusing my efforts on adding audio features to the actual library.
 
Status
Not open for further replies.
Back
Top