[alsa-devel] function location?

Hi,
I am trying to write an application to just play a wave file and record sound using ALSA --
I looked at the pcm_min.c file and tried to run it - I am using UBUNTU and 1.0.11-7ubuntu3 sound library called libasound2.
I cant seem to find the pcm.c file which has all the snd_pcm_open and other functions used in the pcm_min.c file!
I am using : /usr/include/alsa/asoundlib.h header -- but i m not sure where the functions defined in this header are -- and, find / -name pcm.c yields nothing --nor does find / -name snd_pcm_open
Any pointers please! Thanks, Ashlesha.

On 4/5/07, Ashlesha Shintre ashlesha.shintre@gmail.com wrote:
Hi,
I am trying to write an application to just play a wave file and record sound using ALSA --
I looked at the pcm_min.c file and tried to run it - I am using UBUNTU and 1.0.11-7ubuntu3 sound library called libasound2.
I cant seem to find the pcm.c file which has all the snd_pcm_open and other functions used in the pcm_min.c file!
Why do you need this to run your program? Just compile like:
gcc -lasound pcm_min.c
Lee

Hi.
First, I shell not fail the case to criticize the missing modular organization of the most popular language for programming the largest systems. The first most important rule of design I was taught in the university was "divide and conquer". C lang tries to prove that it is possible to cope complexity without both modules nor hierarchy. It dumps all the files into one big heap. With the help of assembler-derived text include this approach results in 1) You can have Backer str. both in London and Zürich at the same time. But not in c. Because everything is compiled into one big space. 2) Normally, when you have all the ingredients and glue (your code), you can produce an object. But not in c. Once your file compiles successfully in isolation, does not guarantee it will attached to a larger project. 3) Even C++ with its namespaces patch fails to produce a decent development environment. The best tools for C++ are incommensurably ugly compared to the impressing capabilities of development environments for the Java (relatively new language). Even the most advanced C++ dev tools cannot find identifier declarations (for the same reasons that the OP)! Meantime, Java tools can check syntax on the fly why your are typing. This is power of modules. What is simpler for machines, simpler for people. 1) Finally, the compiler is thousands of times slower than pascal, for instance. This is not an exaggeration. This is a feature for compiling especially huge systems, like OSes as a whole. But the perverted c-bigots wrestle the sluggishness of the c compiler turning it into a big advantage by arguing that "it does much more work for the programmer!". Without clarifying which work, of course. Perhaps they mean that c (pre)kompiler, linker and other stuff do good job obfuscating your functions so that the linker you will never know which line of code contains the function which cannot be resolved.
Ok, excuse me for the moralizations. I just want everybody to understand these simple things. I wish some real progress rather than crap in our life and heads wasting our time. Go to the alsa-lib/src/pcm/ directory.
Hi,
I am trying to write an application to just play a wave file and record sound using ALSA --
I looked at the pcm_min.c file and tried to run it - I am using UBUNTU and 1.0.11-7ubuntu3 sound library called libasound2.
I cant seem to find the pcm.c file which has all the snd_pcm_open and other functions used in the pcm_min.c file!
I am using : /usr/include/alsa/asoundlib.h header -- but i m not sure where the functions defined in this header are -- and, find / -name pcm.c yields nothing --nor does find / -name snd_pcm_open
Any pointers please! Thanks, Ashlesha. _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

On 04/06/2007 01:09 AM, intellij wrote:
I just want everybody to understand these simple things. I wish some real progress rather than crap in our life and heads wasting our time. Go to the alsa-lib/src/pcm/ directory.
Congratulations; you completely and utterly failed to get the point. The poster didn't know about libraries.
Rene.

Congratulations for being able to read human minds. The point given was to get location of pcm.c file which resides only in one place. Moreover, it is behind my low intellect to understand how it is to work with alsa lib asking for implementation inside it without having any idea about alsa lib! I really miss something after the "clarification".
On 04/06/2007 01:09 AM, intellij wrote:
I just want everybody to understand these simple things. I wish some real progress rather than crap in our life and heads wasting our time. Go to the alsa-lib/src/pcm/ directory.
Congratulations; you completely and utterly failed to get the point. The poster didn't know about libraries.
Rene.

intellij wrote:
- Normally, when you have all the ingredients and glue (your code), you can produce an object. But not in c. Once your file compiles successfully in isolation, does not guarantee it will attached to a larger project.
Neither is it guaranteed in other languages.
- Even C++ with its namespaces patch fails to produce a decent development environment. The best tools for C++ are incommensurably ugly compared to the impressing capabilities of development environments for the Java (relatively new language).
One cannot create an OS with Java.
Best Regards,
Carlo

intellij wrote:
- Normally, when you have all the ingredients and glue (your code), you can produce an object. But not in c. Once your file compiles successfully in isolation, does not guarantee it will attached to a larger project.
Neither is it guaranteed in other languages.
It is guaranteed in all normal/decent languages. I do not know any other such a stupid language dumping everything into one namespace.
- Even C++ with its namespaces patch fails to produce a decent development environment. The best tools for C++ are incommensurably ugly compared to the impressing capabilities of development environments for the Java (relatively new language).
One cannot create an OS with Java.
What precludes somebody from doing so? I have a native java processor running java bytecodes natively. It executes nothing but java. In which language is its OS written?
On the other hand, if you look into linux kernel, the core arch files are mostly written in asm, not in C. Should we conclude, following your logic, that the ASM is more perfect language than C?
So, the facts suggest that the things are vice-versa: it is possible to create an OS in Java but not in C!
Best Regards,
Carlo

On Fri, Apr 13, 2007 at 04:55:17PM +0400, intellij wrote:
On the other hand, if you look into linux kernel, the core arch files are mostly written in asm, not in C. Should we conclude, following your logic, that the ASM is more perfect language than C?
So, the facts suggest that the things are vice-versa: it is possible to create an OS in Java but not in C!
Is it just me, or is this thread totally irrelevant to this list? Please don't encourage trolls.
John
participants (6)
-
Ashlesha Shintre
-
Carlo Florendo
-
intellij
-
John Rigg
-
Lee Revell
-
Rene Herman