cplussharp/graph-studio-next

Loading GRF of GRFX file should preserve 'use clock' status of graph

mikecopperwhite opened this issue · 4 comments

To reproduce:

  • Create any playback graph by open a supported media file containing audio
  • Disable play use clock
  • Save as GRF or GRFX file
  • Reload from saved GRF or GRFX file

Expected: Use clock is disabled
Actual: Use clock is enabled.

GraphEdit remembers this when the graph is reloaded from a GRF file. Graph Studio Next should do the same.

I suspect our post loading processing is overriding the clock used by the graph.

Well we might also like to have persistent setting for use filter X as clock as well... I don't think it's used often though, and I don't think GRF can hold that, but GRFX can easily reuse new clock XML value which is empty/"none" now and can also have index of specific filter.

I think we've made conflicting changes. The clock setting should ideally occur in the GRFX specific code.

The default GRF loading sets the clock itself.

The internal GRF parser should do the same. The GRF does seem to contain the filter index of the selected clock - see where clock_index is set at the end of GRF_File::Load. clock_index is not currently used.

Regarding GRF, the default implementation of persistence does not affect clock, or no? If it does not modify clock then we can only add it as a side setting in the structured document file. I would perhaps rather not bother with it, especially that GRFX is already a superior option (to me it looks as obvious superior option because I can edit the file and modify/fix paths contained there).

I saw the conflicting changes but I think I merged them? Now I re-checked and I think this still needs an update.

I also see that clock_index exists but is not used (is to be used if/when we implement clock as specific filter).

Default GRF persistence does set the clock to the same filter as when saved
though I'm not sure how it represents the distinction between system clock
and no clock. Need to test further but may not get a chance until next week.

Great to have the GRF X support in.

GRF files are not entirely dead. The internal graph parser will prompt to fix up paths at load time. Also very easy to save and load GRF files from other code.

On 30 Jun 2015 10:48, "Roman R." notifications@github.com wrote:

Regarding GRF, the default implementation of persistence does not affect
clock, or no? If it does not modify clock then we can only add it as a side
setting in the structured document file. I would perhaps rather not bother
with it, especially that GRFX is already a superior option (to me it looks
as obvious superior option because I can edit the file and modify/fix paths
contained there).

I saw the conflicting changes but I think I merged them? Now I re-checked
and I think this still needs an update.

I also see that clock_index exists but is not used (is to be used if/when
we implement clock as specific filter).


Reply to this email directly or view it on GitHub
#268 (comment)
.