FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Append Capture to OpenAL

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
bmeck



Joined: 22 May 2007
Posts: 6

PostPosted: Fri Aug 08, 2008 10:58 pm    Post subject: Append Capture to OpenAL Reply with quote

I have gotten recording working in OpenAL by appending the following to alFuncs and altypes. Since it is in the spec (http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm#_6.4.2._Capture) I think it would be nice to have it merged into derelict.

altypes.d

ALenum
Code:

ALC_DEFAULT_CAPTURE_DEVICE_SPECIFIER      = 784,
ALC_CAPTURE_DEVICE_SPECIFIER              = 784,
ALC_CAPTURE_SAMPLES                       = 786,


alfuncs.d

End of loadAL
Code:

//Capture
   bindFunc(alcCaptureOpenDevice)("alcCaptureOpenDevice",lib);
   bindFunc(alcCaptureCloseDevice)("alcCaptureCloseDevice",lib);
   bindFunc(alcCaptureStart)("alcCaptureStart",lib);
   bindFunc(alcCaptureStop)("alcCaptureStop",lib);
   bindFunc(alcCaptureSamples)("alcCaptureSamples",lib);

Before "// ALU"
Code:

//Capture
typedef ALCdevice* function(char*deviceName, ALCuint freq,ALCenum fmt, ALCsizei bufsize) pfalcCaptureOpenDevice;
typedef ALCboolean function(ALCdevice *device) pfalcCaptureCloseDevice;
typedef void function(ALCdevice *device) pfalcCaptureStart;
typedef void function(ALCdevice *device) pfalcCaptureStop;
typedef void function(ALCdevice *device, ALCvoid *buf, ALCsizei samps) pfalcCaptureSamples;
pfalcCaptureOpenDevice                  alcCaptureOpenDevice;
pfalcCaptureCloseDevice                 alcCaptureCloseDevice;
pfalcCaptureStart                       alcCaptureStart;
pfalcCaptureStop                        alcCaptureStop;
pfalcCaptureSamples                     alcCaptureSamples;
Code:
Code:
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 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


Powered by phpBB © 2001, 2005 phpBB Group