Code Monkey home page Code Monkey logo

Comments (4)

tuffy avatar tuffy commented on August 17, 2024

I've updated the ALSA output module to support 32-bit output for 24-bit input files and it appears to be working correctly on my system. Hopefully this will solve your playback issue.

from python-audio-tools.

litolff avatar litolff commented on August 17, 2024

I made 2 different approaches to use your library with 24bit files:

1.) using audiotools,player.Player gives:
File "/usr/lib/python3.4/site-packages/audiotools/player.py", line 992, in set_format
bits_per_sample)
OSError: unable to attach ALSA mixer to card

2.)
pcmReader = at.open(uri).to_pcm()
mask = pcmReader.channel_mask
pcmConverter = at.PCMConverter(pcmReader,96000,2, mask,32)#16 instead 32 works
self.__pcmreader = at.BufferedPCMReader(pcmConverter)

gives:
File "/usr/lib/python3.4/site-packages/audiotools/init.py", line 2965, in PCMConverter
raise ValueError(ERR_INVALID_BITS_PER_SAMPLE)
ValueError: invalid bits-per-sample

.asoundrc in my /home is:
pcm.!default {
type hw
card 0
device 8
}
ctl.!default {
type hw
card 0
device 8
}

from python-audio-tools.

tuffy avatar tuffy commented on August 17, 2024

Looks like your default ALSA device doesn't support mixers. I've updated my ALSA output module to work without them. This should hopefully enable proper playback, though volume control won't be accessible from within Python Audio Tools.

from python-audio-tools.

litolff avatar litolff commented on August 17, 2024

wow, that was fast, thank you very much
...proper playback enabled :-)
tested with 24bit/48000Hz, 24bit/88200Hz and 24bit/96000Hz
...volume control is not necessary
i'm one of those paranoid audiophils, looking for the shortest audiopath... no pulse, no mixer ;-)

although it's not vital anymore, would it be possible to support 32bit in PCMConverter ?

from python-audio-tools.

Related Issues (20)

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.