Go Down

Topic: Problem with SimpleSDAudio library (Read 185 times) previous topic - next topic

feddynventor

Jun 26, 2018, 01:43 pm Last Edit: Jun 26, 2018, 01:45 pm by feddynventor
This library is very good for his lightweight and reliability but in every sketch, with any kind of library or without libraries, that occupies more than 39% of dynamic memory... it doesn't work!

Error code 128
I found this in 'SimpleSDAudio.h' with the corresponding hex error code

Code: [Select]
#define SSDA_ERROR_NULL         0x80    // Null pointer


What does it means?

Where is the offending line in the .h file?

pert

This library
Post a link to where you got the library from. Please use the chain links icon on the toolbar to make it clickable. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

but in every sketch, with any kind of library or without libraries, that occupies more than 39% of dynamic memory... it doesn't work!
Keep in mind the 39% is only the dynamic memory used by globals in your code. You also need enough dynamic memory for local usage.

Error code 128
Where do you encounter that error?

I found this in 'SimpleSDAudio.h' with the corresponding hex error code
Code: [Select]
#define SSDA_ERROR_NULL         0x80    // Null pointer


What does it means?
It means the macro SSDA_ERROR_NULL is defined as 0x80.
https://www.arduino.cc/reference/en/language/structure/further-syntax/define/

feddynventor

In this section of the forum. This topic:
https://forum.arduino.cc/index.php?topic=112745.0

Page of the library managed by the Author of the topic:
https://www.hackerspace-ffm.de/wiki/index.php?title=SimpleSDAudio

The error code is returned by a method in the code and it can be printed in Serial.

I know that that is a definition, I didn't understand what does 'Null pointer' means so we can find what's the problem in this library.

PieterP

The Arduino is a microcontroller. It is not a media player. If you want to play audio, use dedicated hardware.

MarkT

This library is very good for his lightweight and reliability but in every sketch, with any kind of library or without libraries, that occupies more than 39% of dynamic memory... it doesn't work!

Error code 128
I found this in 'SimpleSDAudio.h' with the corresponding hex error code

Code: [Select]
#define SSDA_ERROR_NULL         0x80    // Null pointer


What does it means?

Where is the offending line in the .h file?
The code means malloc failed. You don't have enough RAM.  Checkout the method SDPlayClass::init() in
SimpleSDAudio.cpp
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

MarkT

The Arduino is a microcontroller. It is not a media player. If you want to play audio, use dedicated hardware.
Please be constructive, not churlish.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

feddynventor

The code means malloc failed. You don't have enough RAM.  Checkout the method SDPlayClass::init() in
SimpleSDAudio.cpp
Trying forcing some checks in that file.
But I'm thinking... the program won't work anymore because there isn't enough phisical space.
So... in my opinion, I can do nothing

Go Up