jcsteh / osara

OSARA: Open Source Accessibility for the REAPER Application
GNU General Public License v2.0
121 stars 45 forks source link

Report source type in item navigation #1079

Open day-garwood opened 2 weeks ago

day-garwood commented 2 weeks ago

When navigating through items, the source type (audio, video, midi) is announced when reporting take information (see issue #1066).

In short, "AUDIO" is reported by default for anything that isn't tagged as "VIDEO" or "MIDI". Basic tests show this to be working nicely: Wav, MP3 and FLAC files report "AUDIO", as do frozen MIDI items which seem to have additional content announced naturally to suggest that it is a frozen MIDI item. Giff files specify "VIDEO". MIDI reports MIDI, as expected.

The one thing I haven't tested are container files like MP4 or ogg, or other video formats that inherently support embedded audio (simply because I have none to test with).

Hopefully I've nailed the formatting for this one.

AppVeyorBot commented 2 weeks ago

Build failed! Build osara pr1079-1423,38ddca8e failed (commit https://github.com/jcsteh/osara/commit/38ddca8edd by @day-garwood)

ScottChesworth commented 2 weeks ago

I'm not sure why AppVeyor choked on this. Presumably it built fine locally as you've already been testing it @day-garwood?

day-garwood commented 2 weeks ago

How embarrassing. Sorry about that... Accidentally did my work on the i179 branch. So I made the mistake of switching back to master and then just pasting the file with my latest work in there. Of course that's going to fail because my cpp file still had the tempo changes in which the h file didn't declare the API for! I'll fix that now. Sorry again.

AppVeyorBot commented 2 weeks ago

Build succeeded! Build osara pr1079-1424,ccb10e18 completed (commit https://github.com/jcsteh/osara/commit/ccb10e18c0 by @day-garwood) Downloads:

Windows - [installer/osara_pr1079-1424,ccb10e18.exe](https://ci.appveyor.com/api/buildjobs/51eww6btia36yphs/artifacts/installer/osara_pr1079-1424,ccb10e18.exe) - [locale/osara_pr1079-1424,ccb10e18.pot](https://ci.appveyor.com/api/buildjobs/51eww6btia36yphs/artifacts/locale/osara_pr1079-1424,ccb10e18.pot)
Mac - [installer/osara_pr1079-1424,ccb10e18.dmg](https://ci.appveyor.com/api/buildjobs/8gnd13r3gn4wwd7h/artifacts/installer/osara_pr1079-1424,ccb10e18.dmg)
ScottChesworth commented 2 weeks ago

Glad you figured it out, apparently I still need more practice reading the AppVeyor output at this end. From here it looked like it went build... building... almost built... BONK!

ScottChesworth commented 2 weeks ago

M4A reports as video at the moment. Is that an easy one to resolve? Haven't looked at the code yet. Ogg reports audio, opus reports audio. Mp4 reports video, other image formats jpg and png both report video. I don't think we need to distinguish between video and image, a catchall for items with visual content seems fine to me, we can expect users to know roughly what's where in their own projects.

day-garwood commented 2 weeks ago

Surprised that M4A reports video. Maybe that's because that's usually the audio format used in MP4 videos? Either way it seems that's what the source type is reporting.

The code simply checks if the source type reports video or MIDI and returns that, or returns audio for everything else.

Does ogg return audio even when it contains video data?

Guessing we'll either have to expand my getReportableSourceType function or else find another way of determining the type if it does end up being released.

jcsteh commented 2 weeks ago

My guess is that REAPER doesn't have an audio codec for AAC audio, so it uses the video codec instead, which does support it. I'll wager that this also looks like a video item to sighted users, aside from the fact that it doesn't display any actual video of course.

IMO, providing more info here than sighted users see is out of scope in this case.

ScottChesworth commented 2 weeks ago

I'll wager that this also looks like a video item to sighted users,

Can get that confirmed tomorrow.