[Csnd] OT: python ctypes, mciSendString
Date | 2014-04-15 03:44 |
From | Michael Mossey |
Subject | [Csnd] OT: python ctypes, mciSendString |
Asking a question here about Windows multimedia handling with Python ctypes, hoping the abundance of audio guys here will know the answer. I don't know much about the Windows API so something that should be very simple is not coming easily for me--web searches aren't revealing the answer. My goal is to use MCI with Python ctypes, and basically I need to know where calls like mciSendString are located.print(windll.WinMM.mciSendString) Attribute Error: function 'mciSendString' not found Mike |
Date | 2014-04-15 06:20 |
From | PINOT Francois |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
Hi Mike, I've not been using windows for years now, but of what I remember about it, you should try something like that: ctypes.windll.winmm.mciSendString Hope this helps Francois Le 15/04/2014 04:44, Michael Mossey a écrit : > Asking a question here about Windows multimedia handling with Python > ctypes, hoping the abundance of audio guys here will know the answer. > I don't know much about the Windows API so something that should be > very simple is not coming easily for me--web searches aren't revealing > the answer. > > My goal is to use MCI with Python ctypes, and basically I need to know > where calls like mciSendString are located. > > I can do something like > > from ctypes import * > print(windll.mciSendString) > Attribute Error: function 'mciSendString' not found > > print(windll.WinMM.mciSendString) > Attribute Error: function 'mciSendString' not found > > etc-- in other words, I can't find mciSendString. > > Mike > |
Date | 2014-04-15 06:29 |
From | Michael Mossey |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
That part of the string, "winmm" seems to be case-insensitive. It accepts WinMM, WINMM, etc without saying it can't find the module, but it doesn't find mciSendString in any case. Oh, I'm on Windows 7 64-bit if that makes any difference.Mike On Mon, Apr 14, 2014 at 10:20 PM, PINOT Francois <fggpinot@gmail.com> wrote: Hi Mike, |
Date | 2014-04-15 06:33 |
From | Michael Mossey |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
Doh! I found it. It's mciSendStringA, not mciSendString. Apparently some functions in the Windows API have both ANSI and UNICODE versions and the appended letter indicates which one you want. I'm still hazy about how this works in ctypes but at least now I'm closer to what I can figure out via the documentation. Thanks, Mike On Mon, Apr 14, 2014 at 10:29 PM, Michael Mossey <michaelmossey@gmail.com> wrote:
|
Date | 2014-04-15 06:39 |
From | PINOT Francois |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
Hace you tried mciSendStringA? Anyway MCI is a rather old
technology. Does it still exist on Winsows seven ? What about Direct
X ? Le 15/04/2014 07:29, Michael Mossey a
écrit :
|
Date | 2014-04-15 09:01 |
From | Michael Mossey |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
On 4/14/2014 10:39 PM, PINOT Francois
wrote:
Hace you tried mciSendStringA? Anyway MCI is a rather old technology. Does it still exist on Winsows seven ? What about Direct X ? Yes, that's what I was saying, I tried mciSendStringA and it worked. All I want to do is play a sound file with the selection of start and end points. MCI seems to have this capability and it's not too complicated. Is Direct X simple for this task and can it be easily manipulated from the ctypes module? Mike |
Date | 2014-04-15 09:34 |
From | Francois PINOT |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
As I told you this morning, I've not been working on windows for years (I'm actually on Linux). Maybe other persons on the list might be more qualified than me to answer your question. Regards2014-04-15 10:01 GMT+02:00 Michael Mossey <michaelmossey@gmail.com>:
|
Date | 2014-04-15 22:42 |
From | Michael Mossey |
Subject | Re: [Csnd] OT: python ctypes, mciSendString |
Hi Francois, Yes, I wasn't directing my question at you, but at the list in general. Mike On Tue, Apr 15, 2014 at 1:34 AM, Francois PINOT <fggpinot@gmail.com> wrote:
|