ExoPlayer and start / pause / seekTo commands

The official example of the PlayerControl in the ExoPlayer source code do exactly what you asked: public class PlayerControl implements MediaPlayerControl { private final ExoPlayer exoPlayer; public PlayerControl(ExoPlayer exoPlayer) { this.exoPlayer = exoPlayer; } @Override public boolean canPause() { return true; } @Override public boolean canSeekBackward() { return true; } @Override public boolean canSeekForward() { … Read more

How to play MP3 files in C?

Using FMOD (cross platform), this should be as simple as this: #include <conio.h> #include “inc/fmod.h” FSOUND_SAMPLE* handle; int main () { // init FMOD sound system FSOUND_Init (44100, 32, 0); // load and play mp3 handle=FSOUND_Sample_Load (0,”my.mp3″,0, 0, 0); FSOUND_PlaySound (0,handle); // wait until the users hits a key to end the app while (!_kbhit()) … Read more

sox FAIL util: Unable to load MAD decoder library (libmad) function “mad_stream_buffer”

Steps to using SOX to create MP3s: Download latest version of SOX and install. Download libmad-0.dll and libmp3lame-0.dll. The currently only known trustworthy source is ossbuild but this requires you to download a 1.5 GB archive. The selected two files are available here and here. Add libmad-0.dll and libmp3lame-0.dll to the folder where SOX was … Read more

Read MP3 in Python 3

To make it easier I’d convert with some tools mp3 to wav, either: $ ffmpeg -i foo.mp3 -vn -acodec pcm_s16le -ac 1 -ar 44100 -f wav foo.wav or $ mpg123 -w foo.wav foo.mp3 Then read the WAV with one of the python WAV libraries. I’d recommend PySoundFile because it works with most generated WAV correctly … Read more

How to read and write ID3 tags to an MP3 in C#? [closed]

Taglib# is the best. It’s direct port of the TagLib C library to C#. To install TagLib#, run the following command in the Package Manager Console in Visual Studio. PM> Install-Package taglib The NuGet distribution of taglib-sharp can be found at http://nuget.org/packages/taglib. The official source code repository is at https://github.com/mono/taglib-sharp. Here’s an example using the … Read more

How do I concatenate files in Python?

Putting the bytes in those files together is easy… however I am not sure if that will cause a continuous play – I think it might if the files are using the same bitrate, but I’m not sure. from glob import iglob import shutil import os PATH = r’C:\music’ destination = open(‘everything.mp3’, ‘wb’) for filename … Read more