Comments (4)
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.
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.
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.
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)
- musepack support HOT 12
- Seperate Audio Decoders/Encoders and Audio Utils. HOT 1
- Output filename issue: *** Error: output file "track00.wav" occurs more than once HOT 1
- Utility to automatically merge gapless tracks HOT 1
- Fix CoreAudio for Python 3.x builds.
- "Error: read error during encoding" during wav to flac conversion
- ImportError: cannot import name WavPackDecoder HOT 1
- have any demo code for playing mp3?
- Import error while using `to_pcm()` method of OpusAudio class
- 'python setup.py clean' does not clean build files HOT 1
- audiotools.open does not recognize MP3 files in MPEG-2 or MPEG-2.5 format
- Error building on Windows pcm.h syntax error HOT 3
- how to change the output? HOT 1
- Is there a way to enqueue audio files for playing? HOT 1
- No ReplayGain tags added to aiff files
- raise UnsupportedFile(filename) HOT 2
- duplicate man audiotools.cfg.5 in man1 and man5
- FreeDB is no more HOT 1
- Container with python-audio-tools
- Missing mp3 write support after building, not sure how to debug why
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-audio-tools.