| Reply | « Previous Thread | Next Thread » |
|
Hi everyone, here's my doubt :
There is any way to use a function during an specific time? The idea is to call a function, and tell the function to be used only during x seconds. The function I'm talking about, just mutes the audio file that is sounding. In other words, I'm trying to implement a function which while listening to a song, if you press a key (anyone) you will mute the audio file during those x seconds. Thanks in advance :-) |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Hi,
I'm not sure I understand. Do you mean you want to press a key and hold it down, and while it's down you want the audio to be muted? If so, you can probably do it by calling the function when the key press even is detected and then calling another function, which resets the volume, when the key release event is detected. Please try to explain the situation again. |
|
Hi Bogdan, thanks for your interest.
What I meant is: I just want to press the key once, just a simple press. Once I've pressed the key (I'm not holding it down or pressing again), the mute function is activated during x seconds. When those x seconds have passed, the function mute is not used anymore and the volume is reset. Is this explanation clearer? Danko |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Yes. Well all you have to do is call the function that sets the volume to 0 and use a timer (more information in the PyS60 Library Reference, the part about Ao_timer) to call the function that resets the volume once x seconds have passed. There's a somewhat close example here.
|
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hello Danko22
just to add something to bogdans answer, please have a look at this wiki article about how not to use timers. ![]() Regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| ShortMsgReceived - Delphi | qb_soft | PC Suite API and PC Connectivity SDK | 9 | 2008-06-22 11:30 |
| Help with lnk2019 lnk1120 error | yuenfatt | General Symbian C++ | 8 | 2007-08-24 09:21 |
| a function return value problem | letmefly111 | General Symbian C++ | 3 | 2007-07-23 21:50 |
| C-code..unable to make sis | Symbian_Neil | General Symbian C++ | 9 | 2006-12-02 08:55 |
| Problem with Nokia D211 Linux Drivers | fiveam | Multimodecards | 1 | 1970-01-01 02:00 |