Code Monkey home page Code Monkey logo

arduino-audio-driver's People

Contributors

alteman avatar fathermarco1971 avatar pschatzmann avatar uutzinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

arduino-audio-driver's Issues

Encoding failed: Handle passed to function call was invalid

Hi, I am using the codec with Arduino Audio Tools on an Audio Kit board.

[E] AACEncoderFDK.h : 234 - Encoding failed: Handle passed to function call was invalid

I am using the streams-audiokit-webserver_aac.ino example.
I am also using the new Auduino-Audio-Driver.
I am also using the auduino-fdk-acc codec

The code builds and uploads but i get this runtime error in the serial monitor when i connect to the web server via Chrome.

Thanks

Eric

suggest explicit braces to avoid ambiguous 'else' [-Werror=dangling-else]

Error in title compiling main stream:

for (auto &tmp : spi) {
      AD_LOGD("DriverPins::begin::SPI::begin");
      if (tmp.function == PinFunction::SD)
        if (sd_active)
          result &= tmp.begin();
      else
        result &= tmp.begin();
    }

I think that adding braces make code cleaer effectively

   for (auto &tmp : spi) {
      AD_LOGD("DriverPins::begin::SPI::begin");
      if (tmp.function == PinFunction::SD)
      {
        if (sd_active)
          result &= tmp.begin();
      else
        result &= tmp.begin();
      }
    }

Audio kit keeps rebooting

I have the ESP32 Audio kit V2.2 and I am running this code:

#include <Arduino.h>

/**
 * @brief We use a predefied board (AudioKitEs8388V1) and output_device a sine
 * with the help of the AudioTools I2SCodecStream
 * @author phil schatzmann
 */

#include "AudioTools.h" // install https://github.com/pschatzmann/arduino-audio-tools
#include "AudioLibs/I2SCodecStream.h"

AudioInfo info(44100, 2, 16);
SineWaveGenerator<int16_t> sineWave(32000);
GeneratedSoundStream<int16_t> sound(sineWave);
I2SCodecStream out(AudioKitEs8388V1);
StreamCopy copier(out, sound);

void setup()
{
  // Setup logging
  Serial.begin(115200);
  AudioLogger::instance().begin(Serial, AudioLogger::Warning);
  LOGLEVEL_AUDIODRIVER = AudioDriverWarning;

  // start I2S & codec with i2c and i2s configured above
  Serial.println("starting I2S...");
  auto config = out.defaultConfig();
  config.copyFrom(info);
  out.begin(config);

  // Setup sine wave
  sineWave.begin(info, N_B4);
}

// Arduino loop - copy sound to out
void loop() { copier.copy(); }

on PlatformIO
with this platformio.ini


[platformio]
description = Audio Example
default_envs = esp32dev

[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = arduino
lib_deps =  
    https://github.com/pschatzmann/arduino-audio-tools.git
    https://github.com/pschatzmann/arduino-audio-driver.git
lib_ldf_mode = deep+
build_flags =  -DCORE_DEBUG_LEVEL=5 -DAUDIOKIT_BOARD=5 
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

Compile and upload work fine, but it keeps rebooting with this message :


ELF file SHA256: 11734f0e505573e4

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[    23][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
starting I2S...
Warning: Pin '13' not set up because of conflict
[    35][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=33 scl=32 freq=100000
Error:   ->p_wire->endTransmission: 2
Error:   ES8388 not found on I2C address 10, check wiring
Error:   AudioDriver::begin::init failed
Error:   ->p_wire->endTransmission: 2
Error:   ->p_wire->endTransmission: 2
Error:   ->p_wire->endTransmission: 2
Error:   ->p_wire->endTransmission: 2
Error:   ->p_wire->endTransmission: 2
Error:   ->p_wire->endTransmission: 2
[E] I2SCodecStream.h : 73 - virtual bool audio_tools::I2SCodecStream::begin()
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400e1cda  PS      : 0x00060a30  A0      : 0x800d3f4b  A1      : 0x3ffb2120  
A2      : 0x00000000  A3      : 0x3ffba8a0  A4      : 0x00000400  A5      : 0x3ffb2160  
A6      : 0xffffffff  A7      : 0x3ffc2f24  A8      : 0x00000000  A9      : 0x3ffb2120  
A10     : 0x3ffb2164  A11     : 0x00000010  A12     : 0x40ac101f  A13     : 0x37354443  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001d  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000018  LBEG    : 0x400029ac  LEND    : 0x400029cb  LCOUNT  : 0x00000000  


Backtrace: 0x400e1cd7:0x3ffb2120 0x400d3f48:0x3ffb2160 0x400d3ff9:0x3ffb21d0 0x400d4039:0x3ffb21f0 0x400d5cd7:0x3ffb2210 0x400d5e90:0x3ffb2230 0x400d5fa6:0x3ffb2270 0x400de4a9:0x3ffb2290




ELF file SHA256: 11734f0e505573e4

Rebooting...

What am I doing wrong?
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.