Skip to content

"Leaky" memory usage when using repeat_infinite() #673

@Pmyl

Description

@Pmyl

Hello,
I'm using Rodio for my application and I'd like for my music to repeat multiple times. I've found the repeat_infinite() function for the Source struct but when I monitored the memory usage I've found out that it's growing about at 10mb every 15 seconds.

I haven't checked if it eventually caps, I only saw that it went from 30mb of memory to 100mb+.

Not using repeat_infinite() works as intended, the memory usage doesn't move.

In my app I create a Sink and I append the Decoder wrapping my music. I assumed that the problem was about buffering more and more music, but in my case the music is in a Cursor<Vec<u8>> so it shouldn't load any more of it (plus my music file is definitely less than 70mb).

System:
OS: Linux X11 pop 22.04
Memory: 61.9 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 4070 || NVIDIA || 560.35.03

Relevant crates:
cpal = "0.15.3"
rodio = "0.20.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions