Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameters sequencer_name and sequencer_stream #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sheffler
Copy link

I believe sequencer_name is meant to be typed 'alsa_sequencer_name' (See where it is used in _init_handle)

sequencer_stream seems to be misnamed (it should be 'alsa_sequencer_stream'). The value of this parameter seems to be a MODE (BLOCK/NONBLOCK) rather than a STREAM (DUPLEX, INPUT, OUTPUT)

Please read the commit logs for more

The argument 'sequencer_stream' has no effect because the underlying
code looks for 'alsa_sequencer_stream'

The value of 'alsa_sequencer_stream' should be one of DUPLEX, OUTPUT
or INPUT.  As it was, the value was 'not NONBLOCK'.  I think
that BLOCK/NONBLOCK should be the values of a argument named
'alsa_sequencer_mode'
@vishnubob
Copy link
Owner

Hi, sorry it took me so long to get to this pull request. Can you explain what this fixes? My feeling is that these argument names are named in such a way to allow for different sequencer drivers, making it easier to write code for any driver (assuming new drivers become available).

@sheffler
Copy link
Author

sheffler commented Jul 7, 2015

I may be entirely wrong ... but here is what I remember.

In sequencer_alsa/sequencer.py, I see the following

def _init_handle(self):
    ret = S.open_client(self.alsa_sequencer_name,
                        self.alsa_sequencer_type,
                        self.alsa_sequencer_stream,
                        self.alsa_sequencer_mode)
    if ret == None:
        # XXX: global error
        self._error(ret)
    self.client = ret
    self.client_id = S.snd_seq_client_id(self.client)
    self.output_buffer_size = S.snd_seq_get_output_buffer_size(self.client)
    self.input_buffer_size = S.snd_seq_get_input_buffer_size(self.client)
    self._set_poll_descriptors()

The call to open_client uses the attribute "alsa_sequencer_name" but the Sequencers - SequencerRead, SequencerWrite, SequencerDuplex - define the attr "sequencer_name"

I think I noticed this when I attempted to name the sequencer. It's been a long time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants