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
QtWS25 Last Chance

Play sound on Raspberry

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 751 Views
  • 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        Hi,

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

        P Offline
        P Offline
        Pueablo
        wrote on last edited by Pueablo
        #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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

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

            P Offline
            P Offline
            Pueablo
            wrote on 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

            Pablo J. RoginaP 1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              0
              • SGaistS SGaist

                How are you playing that sounds ?

                P Offline
                P Offline
                Pueablo
                wrote on 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

                  @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

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on 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
                  0
                  • Pablo J. RoginaP Pablo J. Rogina

                    @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 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?

                    jsulmJ 1 Reply Last reply
                    0
                    • P Pueablo

                      @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?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 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

                      • Login

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