Does anyone know if there is a C library with functions that we can call from GnuCOBOL that can be used to produce sounds ?
Maybe if possible with some example of calls ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The API is usually GnuCOBOL friendly (in that it uses POINTER, and not the struct definitions), so you can usually ignore all the hassles with layouts, field sizes and alignments and just use POINTER, letting the SDL engine C code fill in the fields as appropriate for the platform.
We can talk more if you want, but SDL is a good target to use, well supported across platforms (or so I'm led to believe, only ever working with GNU/Linux of late, so there might be the hassle dance on Windows or Mac).
Cheers,
Blue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-07-23
Hi Brian, your indication as always, is very interesting.
As soon as you look at the documentation for this library, a world of possibilities opens up.
I would very much like to check how many things GnuCOBOL can do with this library.
To avoid re-inventing hot water, could you prepare a simple example of a GnuCOBOL program that plays a simple "C scale" ?
Do, Re, Mi, Fa, Sol, La, Si, Do in Italian, may be in English it says C, D, E, F, G, A, B, C.
I guess for you with your knowledge this could be a few minutes job.
For me it would be much more challenging.
Then having a starting point I could continue on my own.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll try and GnuCOBOL-ize the audio demo, Eugenio, but don't wait, as I won't know when.
For graphics and sounds, OpenGL, LibSDL are fairly ubiquitous now. Good skills to know as we sprint into the future. SDL layers on top of ALSA or Pulse or Jack and all the other possible libraries, so picking SDL works on a wide swathe of local setups. OpenGL is graphics through the GPU, so everywhere too.
Linking to either set of libraries is often a no-cost-to-user choice, as the link loader will likely have the DSOs in memory already in support of whatever desktop is in use. On Linux as least, becoming more and more unfamiliar with Win/Mac trends.
Oh, and being a crappy bass player, I think the English form of the scale is E, E, E, Eeeeeeee. :-)
Cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. thank you very much for the invaluable information and for what you can do.
Maybe it could also be included as an update to the huge mine represented by your FAQ.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does anyone know if there is a C library with functions that we can call from GnuCOBOL that can be used to produce sounds ?
Maybe if possible with some example of calls ...
I'd suggest libsdl, Eugenio.
https://www.libsdl.org/release/SDL-1.2.15/docs/html/guideaudioexamples.html
The API is usually GnuCOBOL friendly (in that it uses POINTER, and not the
structdefinitions), so you can usually ignore all the hassles with layouts, field sizes and alignments and just use POINTER, letting the SDL engine C code fill in the fields as appropriate for the platform.We can talk more if you want, but SDL is a good target to use, well supported across platforms (or so I'm led to believe, only ever working with GNU/Linux of late, so there might be the hassle dance on Windows or Mac).
Cheers,
Blue
Hi Brian, your indication as always, is very interesting.
As soon as you look at the documentation for this library, a world of possibilities opens up.
I would very much like to check how many things GnuCOBOL can do with this library.
To avoid re-inventing hot water, could you prepare a simple example of a GnuCOBOL program that plays a simple "C scale" ?
Do, Re, Mi, Fa, Sol, La, Si, Do in Italian, may be in English it says C, D, E, F, G, A, B, C.
I guess for you with your knowledge this could be a few minutes job.
For me it would be much more challenging.
Then having a starting point I could continue on my own.
I'll try and GnuCOBOL-ize the audio demo, Eugenio, but don't wait, as I won't know when.
For graphics and sounds, OpenGL, LibSDL are fairly ubiquitous now. Good skills to know as we sprint into the future. SDL layers on top of ALSA or Pulse or Jack and all the other possible libraries, so picking SDL works on a wide swathe of local setups. OpenGL is graphics through the GPU, so everywhere too.
Linking to either set of libraries is often a no-cost-to-user choice, as the link loader will likely have the DSOs in memory already in support of whatever desktop is in use. On Linux as least, becoming more and more unfamiliar with Win/Mac trends.
Oh, and being a crappy bass player, I think the English form of the scale is E, E, E, Eeeeeeee. :-)
Cheers
Ok. thank you very much for the invaluable information and for what you can do.
Maybe it could also be included as an update to the huge mine represented by your FAQ.
Sorry ... I forget to Login .