[Speex-dev] How to get audio data from microphone on pocketPC ?

patrick andrieux patrick.andrieux at gmail.com
Tue Jun 27 10:18:45 PDT 2006


Hi,

I think those options are good, but i didn't create empty project.
I just tick export symbols, and by this way i had DllMain(...) and some
other stuff in my main cpp file,
and also example of exported function and variable.

after that, you have to create a .def file : (i think it's as well in
Microsoft link)
 - add a new item, select Code under Categories, and then select Module
Definition File under Templates.
 - Type XXXX.def as the name of the module definition file, and then click
Add
 - Add the following two lines to the XXXX.def file after the line
containing LIBRARY ."XXXX".
                 EXPORTS
                  your_fct

 - Modify the XXXX.h file by changing the following code:
                 XXXX_API int your_fct(void);
to:             extern "C" XXXX_API int your_fct(void);

next step is to include the folders of speex src, .....
in your dll properties :
   - in C/C++ -> General. "additionnal include directories"  ..\speex-
1.1.12\include ; ..\speex-1.1.12\libspeex
   - in Linker -> General. "additionnal librairy directories" ..\speex-
1.1.12\win32\libspeex\debug
   - in Linker -> input . "additionnal dependencies" libspeex.lib


i also modified i little speex folder :
in the original archive, in "include" folder, there is only speex folder and
2 Makefile.XX
i had need to create one file in "include" folder for one file in "speex"
folder.
so i created .../include/speex.h because there is .../include/speex/speex.h
i this file, i just write #include "speex/speex.h"
(i'm sure it's not clear enough so let me explain with a beautiful schema)

here is the arborescence before :
speex-1.1.12
|
\---include
          Makefile.in
          Makefile.an
    \---speex
            speex.h
            speex_bits.h
            ...
             ...

here is the arborescence after :
speex-1.1.12
|
\---include
        speex.h             <---- in this file : #include "speex/speex.h"
        speex_bits.h      <---- in this file : #include "speex/speex_bits.h"
         ...
         ...
          Makefile.in
          Makefile.an
    \---speex
            speex.h
            speex_bits.h
            ...
             ...

Do you understand me ?
Let me know if you still have issue with this dll.



about fmod, i tried using it, and i got some sound but it was very crappy.
And i prefere to use microsoft wave API, because it's more corresponding of
what i need.
Do you have knowledge about that to help me ?

what i would like to do is to record few ms, let say 10ms, encode it with
speex, send it, and do it again till i stop the call.
apparently, i have some trouble with the callback (it's call when a buffer
is full).
so i use waveInUnprepareHeader(..), i copy the data in a big buffer and i
run waveInPrepareHeader(..) and waveInAddBuffer(..) another time for another
record.
when my big buffer is full, i try to play it but there is no sound or just
crrcrr..?§,!

idea ?


Pat.




2006/6/27, JM <majemi00 at students.oamk.fi>:

    Hi Patrick and thanks for helping out, I was able to create libspeex.lib
    already.

    Could you help me more with creating speex.dll? I also use VS2005, but I
    write my application with c++.

    I created new project (speexDLL):
    Win32 Smart Device Project,
    Application type: DLL,
    Additional options: Export symbols, Empty project.

    Are those options ok? What should I do next? Should there be Main
function
    in this dll project? Should I add all files to my project from
    speex-1.1.12 folder under include, libspeex and src folders?

    Did you do it exactly as it is showed by Microsoft (Managed Debugging:
    Debugging Interop Projects)?

    Did you tried using fmod allready?

    -Jere-




    patrick andrieux <patrick.andrieux at gmail.com> kirjoitti Fri, 23 Jun 2006
    12:54:24 +0300:
    >
    > Basically, In my GUI in C#, i import the functions i wrote in my dll
    > and in my dll, i call the speex's functions.
    >
    > For creating C++ dll for ppc, you'll maybe need this link :
    >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/device_debug_vs2005.asp
    >
    > in your speex.dll properties you have to add :
    >  - linker/input, add libspeex.lib in "additional dependencies"
    >  - C/C++/General, add the path to speex source in "additional include
    > directories"
    >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060627/ec61765f/attachment.htm


More information about the Speex-dev mailing list