| View previous topic :: View next topic |
| Author |
Message |
NicoF Newbie
Joined: 12 Jan 2007 Posts: 5
|
Posted: Fri Jan 12, 2007 1:02 am Post subject: SoundCard and PyMedia compatibility |
|
|
Hi everybody,
I am a newbi with PyMedia and i a have questions about the compatibility with soundcards.
I a using PyMedia with WinXP and i need to record sound with a good precision. It's why i need to add a sound card to my computer (the one integrated in my PC is not sufficient for my application).
Is there any probleme of compatibility known ?
I am interested either by these souncards with an external interface or by USB souncard? Is there any specific requierment for using PyMedia with thee type of sounccard?
Is there any probleme with PyMedia to have 2 soundcard one the PC?
Thanks. |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Fri Jan 12, 2007 9:51 am Post subject: |
|
|
| Basically if Windows see the soundcard it should be no problem using PyMedia with >1 soundcard. See aplayer.py example for that. |
|
| Back to top |
|
 |
NicoF Newbie
Joined: 12 Jan 2007 Posts: 5
|
Posted: Mon Jan 15, 2007 2:18 am Post subject: |
|
|
| Thanks for your reply. i will try it. |
|
| Back to top |
|
 |
NicoF Newbie
Joined: 12 Jan 2007 Posts: 5
|
Posted: Fri Mar 23, 2007 12:18 am Post subject: |
|
|
Hello,
It's done, i bought a sound card for my laptop, i try it and....
blue screen and reboot of my computer.
Does anyone have encountred this kink of probleme ?
Thanks |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Fri Mar 23, 2007 7:09 am Post subject: |
|
|
| What did you try ? PyMedia crashes pc ? Can you try to play sound via Windows to that card ? |
|
| Back to top |
|
 |
NicoF Newbie
Joined: 12 Jan 2007 Posts: 5
|
Posted: Fri Mar 23, 2007 8:09 am Post subject: |
|
|
I've tried this card with audacity and the card work (recording and playing).
I've tried the following code:
import pymedia.audio.sound as sound
import wave
import time
import winsound
card=0
print(sound.getIDevices()[card])
snd= sound.Input( 44100, 2, sound.AFMT_S16_LE,card )
snd.start()
time.sleep(0.1)
nb=snd.getSize()
print(nb)
s= snd.getData()
snd.stop()
print("end")
The new soundcard is at the index 0
{'name': 'Indigo io', 'channels': 65535, 'manufId': '1', 'formats': 786431, 'id': 0, 'productId': '65'}
sometimes snd.getSize()=0 and sometimes not.
The crash occured when snd.getSize()=0 |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Fri Mar 23, 2007 11:24 am Post subject: |
|
|
Hmm.
I can't think of anything pymedia can do to crash the PC. Does it crash when you use another sound card ? |
|
| Back to top |
|
 |
NicoF Newbie
Joined: 12 Jan 2007 Posts: 5
|
Posted: Sun Mar 25, 2007 11:07 pm Post subject: |
|
|
No, I used pymedia with the laptop integrated soundcard and it perfectly works.
In the previous soft i put card = 1 instead of card =0
the working card description is:
{'name': 'SigmaTel Audio', 'channels': 65535, 'manufId': '1', 'formats': 786431, 'id': 1, 'productId': '65'}
I made severals tests and i noticed this (it could help):
When i start my PC and directly test my soft it crash.
If i start my computer, launch an applcation using the failling soundcard (windows media player as exemple) and launch my soft it works once and after crash.
this test seem to be reproducible but i don't know what thinking about it. |
|
| Back to top |
|
 |
|