InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SoundCard and PyMedia compatibility

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software
View previous topic :: View next topic  
Author Message
NicoF
Newbie


Joined: 12 Jan 2007
Posts: 5

PostPosted: Fri Jan 12, 2007 1:02 am    Post subject: SoundCard and PyMedia compatibility Reply with quote

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
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Fri Jan 12, 2007 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
NicoF
Newbie


Joined: 12 Jan 2007
Posts: 5

PostPosted: Mon Jan 15, 2007 2:18 am    Post subject: Reply with quote

Thanks for your reply. i will try it.
Back to top
View user's profile Send private message
NicoF
Newbie


Joined: 12 Jan 2007
Posts: 5

PostPosted: Fri Mar 23, 2007 12:18 am    Post subject: Reply with quote

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
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Fri Mar 23, 2007 7:09 am    Post subject: Reply with quote

What did you try ? PyMedia crashes pc ? Can you try to play sound via Windows to that card ?
Back to top
View user's profile Send private message
NicoF
Newbie


Joined: 12 Jan 2007
Posts: 5

PostPosted: Fri Mar 23, 2007 8:09 am    Post subject: Reply with quote

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
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Fri Mar 23, 2007 11:24 am    Post subject: Reply with quote

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
View user's profile Send private message
NicoF
Newbie


Joined: 12 Jan 2007
Posts: 5

PostPosted: Sun Mar 25, 2007 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group