FreeWRL / FreeX3D 4.3.0
libsound.h
1#pragma once
2
3#if !defined(_WIN32)
4#define EXPORT_DLL
5#elif !defined(EXPORT_DLL)
6#if defined(_LIB)
7#define EXPORT_DLL
8#elif defined(_USRDLL)
9#define EXPORT_DLL __declspec(dllexport)
10#else
11#define EXPORT_DLL __declspec(dllimport)
12#endif
13#endif /* _WIN32 && EXPORT_DLL */
14typedef struct ivec3 { int x; int y; int z; } ivec3;
15typedef struct icset { int p; int d; int ld; int n; int s; int ls; } icset;
16typedef struct ivec2 { int x; int y; } ivec2;
17typedef struct ivec4 { int x; int y; int z; int w; } ivec4;
19 int itype; //=5, 0 PointRep 1 LineRep 2 PolyRep 3 MeshRep 4 TextureRep 5 LightRep 6 ProjectorRep 7 SoundRep
20 int icontext; //map audio_contexts[icontext] = lab context
21 int inode; //map nodes[inode] = lab node
22 int igain; //just for nodes that need a separate gain node (Sound)
23 //int inodetype; // x3d 1:1 labsound nodes, shouldn't need if know X3DNode->_nodeType
24 //int iparent; //x3d parent.inode should become destination labnode
25 unsigned int iframe; //last frame visited on scenegraph traversal
26 int ibuffer; //just for source nodes with a buffer, like audioclip
27 float dopplerFactor; //used by AudioClip (computed by SpatialSound in libsound.cpp)
28 void * connections;
29 int last_indexSource[10];
30 int last_indexDestination[10];
31 int last_count;
32};
33
34//enum {
35// AN_AudioClip = 1,
36// AN_AudioBuffer,
37// AN_AudioBufferSourceNode,
38// AN_GainNode,
39// AN_OscillatorNode,
40// AN_AudioDestinationNode,
41//};
42EXPORT_DLL extern struct X3D_SoundRep* getSoundRep(struct X3D_Node* pnode);
43EXPORT_DLL extern void libsound_updateNode3(int icontext, icset connect_parent, struct X3D_Node* node);
44EXPORT_DLL extern void libsound_pauseContext0(int icontext);
45EXPORT_DLL extern void libsound_resumeContext0(int icontext);
46EXPORT_DLL extern void libsound_pauseNode0(struct X3D_Node* node);
47EXPORT_DLL extern void libsound_resumeNode0(struct X3D_Node* node);
48EXPORT_DLL extern void libsound_testNoise();
49EXPORT_DLL extern int libsound_createContext0();
50EXPORT_DLL extern int libsound_createBusFromBuffer0(char* bbuffer, int len);
51EXPORT_DLL extern int libsound_createBusFromPCM32(float* bbuffer, int nchannel, int lentotal);
52EXPORT_DLL extern int libsound_createBusFromPCM(char* buffer, int bits, int nchannel, int lentotal, int freq);
53EXPORT_DLL extern int libsound_createBusFromFile0(char* url);
54EXPORT_DLL extern double libsound_computeDuration0(int ibuffer);
55EXPORT_DLL extern void libsound_print_connections();
56EXPORT_DLL extern void libsound_connect(int icontext, icset iparent);
57EXPORT_DLL extern void libsound_disconnect(int icontext, icset iparent);
58EXPORT_DLL extern void libsound_setListenerPose(float *pos, float *dir, float *up, int trackview);
59//EXPORT_DLL extern void* libsound_createNode(void *context, int type);
60//EXPORT_DLL extern void libsound_connect(void* context, void *destination, void *source);
Definition libmidi.h:3