OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio


Welcome Guest ( Log In | Register )

> Playing Sound, Controlling The Volume, cacko1.23
post Feb 20 2007, 03:45 PM
Post #1

Group: Admin
Posts: 3,542
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149

I have successfully played sound like this...
#include <qsound.h>

QSound soundSample(Resource::findSound("wave"));

However, I am trying to set the volume control.. I have tried everything I can find from googling, but no joy!

If anyone has any ideas, I'd be terrible grateful!

Here's what I have so far:[/code]
Config cfgSound("Sound");
int oldVolume = cfgSound.readNumEntry("Volume", 0);
cfgSound.writeEntry("Volume", 66);
int newVolume = cfgSound.readNumEntry("Volume", 0);
QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;

the code runs but the volume doesn't change..

reading it and calling readNumEntry then writeEntry then readNumEntry reveals the new value is accepted, but the volume level doesn't change!
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 19th June 2018 - 02:14 PM