Skip to content

New port of mpg123.#108

Open
QuzarDC wants to merge 1 commit into
masterfrom
easy_as
Open

New port of mpg123.#108
QuzarDC wants to merge 1 commit into
masterfrom
easy_as

Conversation

@QuzarDC

@QuzarDC QuzarDC commented May 19, 2025

Copy link
Copy Markdown
Member

Perhaps a better alternative for mp3 backend than #104 as it's not bound by integer math.

Needs examples.

@QuzarDC QuzarDC added help wanted Outside help welcome new port Addition of a new port to KOSports labels May 19, 2025
@GPF

GPF commented May 31, 2026

Copy link
Copy Markdown
Contributor

mpg123-stream.zip

works fine, here is an example.

@QuzarDC QuzarDC marked this pull request as ready for review June 6, 2026 03:28
@GPF

GPF commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Getting a weird issue, if I change my mpg123 example to read from /pc over bba it fails, but /rd and /cd work fine with my example and with DCSinge.

I get this error message, i added in some logging code that shows I can access the file over /pc just fine.
DCSinge mpg123 snd_stream test
START exits.

[debug] fs_open OK
[debug] path: /pc/romdisk/mp3_anthem.mp3
[debug] size: 2463869 bytes
[debug] read: 16 bytes
[debug] first 16 bytes: FF FB 90 64 00 00 02 FB 17 51 95 30 60 04 34 E1
[debug] calling mpg123_open(/pc/romdisk/mp3_anthem.mp3)
[debug] mpg123_open OK
[debug] calling mpg123_getformat()
[mpg123] mpg123_getformat: Error reading the stream. (code 18) (-12)

@QuzarDC

QuzarDC commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Getting a weird issue, if I change my mpg123 example to read from /pc over bba it fails, but /rd and /cd work fine with my example and with DCSinge.

I get this error message, i added in some logging code that shows I can access the file over /pc just fine. DCSinge mpg123 snd_stream test START exits.

[debug] fs_open OK [debug] path: /pc/romdisk/mp3_anthem.mp3 [debug] size: 2463869 bytes [debug] read: 16 bytes [debug] first 16 bytes: FF FB 90 64 00 00 02 FB 17 51 95 30 60 04 34 E1 [debug] calling mpg123_open(/pc/romdisk/mp3_anthem.mp3) [debug] mpg123_open OK [debug] calling mpg123_getformat() [mpg123] mpg123_getformat: Error reading the stream. (code 18) (-12)

If you have a serial cable might try over that to be sure it's not the generic /pc vfs. Quite sure though that it's a side effect of this: KallistiOS/KallistiOS#1176 Where dcload-ip doesn't play well with audio dma.

@GPF

GPF commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

If you have a serial cable might try over that to be sure it's not the generic /pc vfs. Quite sure though that it's a side effect of this: KallistiOS/KallistiOS#1176 Where dcload-ip doesn't play well with audio dma.

Yeah good chance it is related to #1176

Yeah I have my original one from 20 years ago(Lik Sang rip), but no serial port on my computer, unfortunately.

I redid my example and got /pc working, by creating my own file reader and seeker implementation using fs_open/read/seek/close , it seems to work as a cdi as well from emulator :)

    err = mpg123_replace_reader_handle(g_mpg,
                                       kos_reader_read,
                                       kos_reader_seek,
                                       kos_reader_cleanup);

mpg123-stream-V2.zip

so not sure if you want to pull that into the internals implementation of the new kos-ports mpg123, or not you can add my example if wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Outside help welcome new port Addition of a new port to KOSports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants