/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Audio functions issue

Username:     
Password:     
             

Forum

# 1   2009-01-27 13:49:23 Audio functions issue

oussema
New member
Registered: 2009-01-22
Posts: 4

Audio functions issue

Hi everybody,

I want to use the audio capability of the circle_os, but until now I'm unsuccessful to call any audio function from the circle_os API, the DRAW functions are working, but the problem is when I call an audio function I get an error in the compiler log:

C:\Work_Stage1\Development\Des_applications_d'essai\AUDIO_Record/record.c:43: undefined reference to `AUDIO_GetMode' 
collect2: ld returned 1 exit status

Is there any include to made before using the audio functions? please help me!
Note: I use version 3.3 of circle os.

Thank you in advance
Oussama

Offline

 

# 2   2009-01-27 14:39:23 Audio functions issue

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Audio functions issue

Check the circle_API.h file in your project. Macro AUDIO_GetMode should declared at line 879:
#define AUDIO_GetMode()                   (AUDIO_DeviceMode_enum)  (((tCircleFunc0)(Circle_API [AUDIO_GET_MODE_ID])) () )                           // AUDIO_DeviceMode_enum AUDIO_GetMode();

Offline

 

# 3   2009-01-27 14:44:57 Audio functions issue

oussema
New member
Registered: 2009-01-22
Posts: 4

Re: Audio functions issue

Hi Francis,
yes, the AUDIO_GetMode is declared at the file circel-API.h, but the problem is when I try to cal any function from the audio API part it generates an error while compiling! Is there anyone who has succeeded to use the audio part of the circle API? Please help.

Thanks to all.
Oussama

Offline

 

# 4   2009-01-27 15:42:00 Audio functions issue

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Audio functions issue

I will check but the definition of the macro should remove the reference to 'AUDIO_GetMode'. It seems that this file is not preprocessed when compiling. The error you report seems to occur while linking, not while compiling.

Offline

 

# 5   2009-01-27 15:54:03 Audio functions issue

oussema
New member
Registered: 2009-01-22
Posts: 4

Re: Audio functions issue

Hello Francis,

Thank you very much. Yes the error is as you have said is occuring while linking. So I'm waiting for a reply from your part.

Regards
Oussama

Offline

 

# 6   2009-01-27 19:57:07 Audio functions issue

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Audio functions issue

If it occures when linking, it means that the macro is not preprocessed.... Either you didn't include the  header file, or the macro is 'hidden for an unknown reason. The problem is not in compiling (the function does not exist and you should not have this error shile linkimg) but when compiling (the preprocessor should replace the name of this function).

Offline

 

# 7   2009-01-30 10:49:03 Audio functions issue

oussema
New member
Registered: 2009-01-22
Posts: 4

Re: Audio functions issue

Hi Francis,

The problem is resolved in reality I used the old version of circle_api.h and Primer2_Circle.elf where the audio functions wasn’t configured.

thanks to all.
Oussama

Offline

 

Board footer