[Openal] OpenAL with C++ WindowsForm application?

Reese quattro004 at gmail.com
Mon Sep 28 11:52:47 PDT 2009


If your interested I've been working on an object oriented wrapper that is
very close to being ready for its first release, it's written in c# and
comes with unit tests and some samples. I'm currently finishing up streaming
but most of the other features are there, if nothing else it might provide a
good place to start. My goal is to recruit people to use it in a game soon
and write some articles on how to use it. If you use it let me know what you
think. http://openal-net-sdk.sourceforge.net

On Mon, Sep 28, 2009 at 8:05 AM, Stefanos A. <stapostol at gmail.com> wrote:

> On Mon, 2009-09-28 at 10:48 -0400, Jason Daly wrote:
> > I'm not an authority on CLR or Forms, but I do know that if you want to
> > use OpenAL with the CLR, you'll have to wrap the library so you can
> > access the native OpenAL methods from your managed code.
>
> Generally, C++/CLI supports "it just works" (IJW) interop with plain C
> libraries, but there might be few cases where you'll have to fix things
> by hand. I'm not especially familiar with C++/CLI but this seems like
> one of those cases.
>
> The CLR generally uses delegates to pass managed function pointers to
> unmanaged code and vice versa. Try wrapping this function to receive a
> delegate decorated decorated with the UnmangedFunctionPointerAttribute.
>
> The other approach is to use a full-blown managed wrapper around OpenAL
> and avoid the need to wrap things by hand. There are a few of those out
> there - I'd recommend OpenTK (http://www.opentk.com), if only because I
> happen to be its main developer. :) This is a low-level, "flat" wrapper
> around OpenAL (i.e. *not* an object oriented abstraction), but it takes
> advantage of some features not available in plain C (e.g. strong types,
> enumerations, function overloads,, generics).
>
> > Ümit Uzun wrote:
> > > Hi All,
> > >
> > > I have an application which had created with MFC before and now I want
> > > to upgrade it with new OpenAL 1.1 version and Windows Form. I have
> > > created new C++ WindowsForm project in VS2008 and only add framework
> > > and set related include and library configurations. But when I compile
> > > I always get
> > >
> > > .\OpenAL\framework\Win32\Framework.cpp(200) : error C2664:
> > > 'CWaves::GetWaveALBufferFormat' : cannot convert parameter 2 from
> > > 'ALenum (__cdecl *)(const ALchar *)' to 'PFNALGETENUMVALUE'
> > > Address of a function yields __clrcall calling convention in /clr:pure
> > > and /clr:safe; consider using __clrcall in target type
> > >
> > > error which I can't find anything at internet about. I think it is
> > > related about /clr because we have to use CommonLanguageRuntimeSupport
> > > beside with MFC we don't need clr.
> > >
> > > How can I solve my problem?
> > > Do you think I can create OpenAL based application which uses
> > > framework like before with Windows Form or not?
> > >
> > > Regards.
> > >
> > > Ümit Uzun
> >
> > _______________________________________________
> > Openal mailing list
> > Openal at opensource.creative.com
> > http://opensource.creative.com/mailman/listinfo/openal
>
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20090928/23781683/attachment.html


More information about the Openal mailing list