Skip to content

Add methods for suppressing all Sound library info/warning messages to Sound() class #65

@besketh

Description

@besketh

I was trying to read the amplitude of a .wav file at a given sample, n, so I used the
processing.sound.AudioSample#read(n)
function which gave me what I wanted, so I was happy, but then I noticed that the terminal was completely swamped with messages about how this was a stereo wave file and it was only giving the amplitude for the left channel. Messages which were completely inconsequential for me as I didn't care which channel the amplitude came from. This was annoying because I was monitoring certain params with the terminal output and it was impossible to find the figures amongst the spam. I thought it was using some kind of logging system which I could turn off but I looked into the source code and found that it was just using System.out.println(). I read into this more and realised that this is not good coding practice.

The example I gave is actually common throughout the codebase and many of the System.out.println() usages link back to this method:

processing.core.PApplet#println(java.lang.String)

I suggest that we use a more sophisticated logging package in place of this method to avoid the problems like the one I described

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions