[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1.1.6 Restoring the project

The user has to go off and do other things, and so they close down the clients and the server. Some time later, the user comes back and wants to start working again so first, as always, they start up the server. They then start the ladcca_control program. This is a text interface command program for controlling the server. They get a command prompt and into it type restore /home/user/audio-projects/project-1. The ladcca_control client sends a CCA_Restore event to the server with the specified directory as the string. The server opens the file that it saved before, and reads in all the information about the project and its clients. It creates a new project with this information. The clients are created as lost clients, however.

The server then iterates through each client and starts a new copy of it using the information provided when the original client connected. It also adds some command line options that are extracted by the client library. These specify the LADCCA ID of the client, the project name that it should be connecting to and the server's hostname and port. It then goes back to waiting.

The new JACK client then connects to the server as normal. When the server recieves it connection, it checks the client against the project's list of lost clients. This time, however, it has its ID specified, so the server will only resume a client with a matching ID. Lo and behold, such a client exists. The server resumes the old JACK client, telling it to load its state from the files in the project directory that the client previously stored. It does so with a CCA_Restore_File event with the string as the directory name. The ALSA client does exactly the same, except having its data restored through CCA_Restore_Data_Set as described above.

Only one thing remains for the clients to be fully restored: the JACK and ALSA sequencer connections. This happens when the clients send their CCA_Jack_Client_Name and CCA_Alsa_Client_ID events. The connections are stored with the LADCCA ID rather than the JACK client name or ALSA client ID. When the client registers its name or ID, the connections are converted from the LADCCA ID to the JACK client name or ALSA client ID, and the connections are restored. It also pays attention to connections to other clients within the same project, converting between JACK client names, ALSA client IDs and LADCCA IDs as appropriate.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by root on June, 1 2005 using texi2html