| Reply | « Previous Thread | Next Thread » |
|
Here is the code in PyS60 for a very tiny player. Here I ask user to enter the path of the file to play through appuifw.query() function.
However I face the problem that the audio output is absent. I changed the play() function as: Code:
song.stop() song.play() I also checked the state and found that its showing the correct state i.e. audio.EOpen before song.play() and audio.EPlaying after song.play() is called. When I manually enter the code into the interactive console (with the same input file) it works fine. Please help. |
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
|
Hi ra.ravi.rav,
Is it the same path problem, which was posted in another thread started by you? IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
Well the code id same but the problem is different. So I posted in a new thread.
|
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
|
Quote:
May be there are problems with the way you provide the path in the appuifw.query ! Let us know what you provide as input in the query. Best Regards, Croozeus |
|
yeah sure. I provide the path as "E\Sounds\song.mp3"
And when I use the same path in appuifw.query() in the shell and use its return value to play the file it runs. I do learn from past mistakes. ![]() |
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
|
any answers?
|
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
|
Quote:
Doesn't providing "E\Sounds\song.mp3" in the path work fine ? Best Regards, Croozeus |
|
I am extremely sorry I forgot to provide the code of the program.
Here it is: http://pastebin.com/m244b4b4d The problem is not solved, I just provided more info about it. The audio output is absent as I said. But when I run the following commands on the shell it just works fine, with the same input of course. Code:
s = appuifw.query(u"Path", "text") song = audio.Sound.open(s) song.play() |
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
|
hi ra.ravi.rav
![]() I modified your code to below and now its working(on N70) ![]() Try it... Code:
import appuifw
import e32
from audio import*
import sys
global song
def play():
global song
s = appuifw.query(u"Path",'text',u"e:\Sounds\Digital\Aafreen.mp3")
song = Sound.open(s)
song.play()
def pause():
global song
song.stop()
def stop():
global song
Sound.close(song)
def exit():
exit = appuifw.query(u"You want to exit?", "query")
if exit:
sys.exit(0)
else:
pass
if __name__ == '__main__':
appuifw.app.menu = [(u"Play", play), (u"Pause", pause), (u"Stop", stop)]
appuifw.app.exit_key_handler = exit
appuifw.app.title = u"FooMP3"
app_lock = e32.Ao_lock()
app_lock.wait()
Chintan Umraliya ![]() |
|
Thanks a lot ck.umraliya
Thats really wonderful. There is just a small itch, why the earlier code didn't work? |
| ra.ravi.rav |
| View Public Profile |
| Find all posts by ra.ravi.rav |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Unable To Stream SMIL files On Nokia 6681 | ali.sajjad | Streaming and Video | 3 | 2009-10-13 08:21 |
| Unable to play audio to telephony uplink on S60 3rd Edition, FP1 devices | inmaat | General Symbian C++ | 21 | 2009-06-17 19:44 |
| To play raw audio data file | pawans | Symbian Tools & SDKs | 2 | 2008-12-11 12:38 |
| Unable to play MP3 audio clip from descriptor | anand_zain76 | Symbian Media (Graphics & Sounds) | 4 | 2008-03-10 11:42 |