Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Play sound on Raspberry
Forum Updated to NodeBB v4.3 + New Features

Play sound on Raspberry

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 794 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pueablo
    wrote on 9 Dec 2021, 17:40 last edited by Pueablo
    #1

    Hi, Im using a raspberry for a project but I have problem with pulseaudio and I need to use the jack 3.5, is there a way to play audio without pulseaudio?

    Edit:
    In case the same thing happens to someone, you can solve the error message by reducing the workload caused by the interface, reducing the sampling time that it had in 3 graphs, from 20ms I went to 50ms and it did not exit the application again, I've been in it for 8 days and it still works fine. Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Dec 2021, 19:33 last edited by
      #2

      Hi,

      What is the issue that you have ?
      Is Pulseaudio working correctly outside of your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 9 Dec 2021, 19:59
      0
      • S SGaist
        9 Dec 2021, 19:33

        Hi,

        What is the issue that you have ?
        Is Pulseaudio working correctly outside of your application ?

        P Offline
        P Offline
        Pueablo
        wrote on 9 Dec 2021, 19:59 last edited by Pueablo 12 Sept 2021, 20:01
        #3

        @SGaist Hi, when I use an audio 10 hours or more, I receive the message:
        "Assertion 're->data || re->memblock' failed at pulsecore/pstream.c:862, function do_read(). Aborting.".
        I have not been able to modify the pulseaudio file and was looking if there is some other way to play audio.
        Do you have any ideas that can help me?

        note: if uninstall pulseaudio the problem is corrected.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 9 Dec 2021, 20:04 last edited by
          #4

          Can you explain what exactly you are doing with your application ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply 9 Dec 2021, 20:19
          0
          • S SGaist
            9 Dec 2021, 20:04

            Can you explain what exactly you are doing with your application ?

            P Offline
            P Offline
            Pueablo
            wrote on 9 Dec 2021, 20:19 last edited by
            #5

            @SGaist I have a 2s length audio that plays every 10s, plus every 15s. command to save 3 .txt files. If I disable the signals to save the .txt files it takes longer to fail. Also, I am graphing 2 signals every 60ms, I do all of this on a raspberry pi 4

            P 1 Reply Last reply 9 Dec 2021, 21:13
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 9 Dec 2021, 20:35 last edited by
              #6

              How are you playing that sounds ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              P 1 Reply Last reply 9 Dec 2021, 21:11
              0
              • S SGaist
                9 Dec 2021, 20:35

                How are you playing that sounds ?

                P Offline
                P Offline
                Pueablo
                wrote on 9 Dec 2021, 21:11 last edited by
                #7

                @SGaist In my constructor:
                AlarmaAudible = new QMediaPlayer;
                AlarmaAudible->setMedia(QUrl::fromLocalFile("/home/pi/audio.mp3"));

                and in my function I have:
                AlarmaAudible->play();

                1 Reply Last reply
                0
                • P Pueablo
                  9 Dec 2021, 20:19

                  @SGaist I have a 2s length audio that plays every 10s, plus every 15s. command to save 3 .txt files. If I disable the signals to save the .txt files it takes longer to fail. Also, I am graphing 2 signals every 60ms, I do all of this on a raspberry pi 4

                  P Offline
                  P Offline
                  Pablo J. Rogina
                  wrote on 9 Dec 2021, 21:13 last edited by
                  #8

                  @Pueablo said in Play sound on Raspberry:

                  If I disable the signals to save the .txt files it takes longer to fail

                  That sounds like something failing to close proper resources.
                  Could you show the slot(s) the "signals" are connected to?

                  Upvote the answer(s) that helped you solve the issue
                  Use "Topic Tools" button to mark your post as Solved
                  Add screenshots via postimage.org
                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                  P 1 Reply Last reply 9 Dec 2021, 21:32
                  0
                  • P Pablo J. Rogina
                    9 Dec 2021, 21:13

                    @Pueablo said in Play sound on Raspberry:

                    If I disable the signals to save the .txt files it takes longer to fail

                    That sounds like something failing to close proper resources.
                    Could you show the slot(s) the "signals" are connected to?

                    P Offline
                    P Offline
                    Pueablo
                    wrote on 9 Dec 2021, 21:32 last edited by
                    #9

                    @Pablo-J-Rogina yes:
                    connect(this, &Ventilamex_V2::EnviarDatosGraficas, &clsPantallaCongelada, &datos_pantalla_congelada::DATOS_RECIBIDOS);
                    connect(this, &Ventilamex_V2::EnviarTipoVentilacion, &clsVentilamexNiv, &ventilamex_niv::TIPO_VENTILACION);
                    connect(this, &Ventilamex_V2::EstadoBloqueoNIV, &clsVentilamexNiv, &ventilamex_niv::ESTADO_BLOQUEO);

                    need anything else?

                    J 1 Reply Last reply 10 Dec 2021, 05:55
                    0
                    • P Pueablo
                      9 Dec 2021, 21:32

                      @Pablo-J-Rogina yes:
                      connect(this, &Ventilamex_V2::EnviarDatosGraficas, &clsPantallaCongelada, &datos_pantalla_congelada::DATOS_RECIBIDOS);
                      connect(this, &Ventilamex_V2::EnviarTipoVentilacion, &clsVentilamexNiv, &ventilamex_niv::TIPO_VENTILACION);
                      connect(this, &Ventilamex_V2::EstadoBloqueoNIV, &clsVentilamexNiv, &ventilamex_niv::ESTADO_BLOQUEO);

                      need anything else?

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 10 Dec 2021, 05:55 last edited by
                      #10

                      @Pueablo I think @Pablo-J-Rogina wanted to see your slot implementations

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      9/10

                      9 Dec 2021, 21:32

                      • Login

                      • Login or register to search.
                      9 out of 10
                      • First post
                        9/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved