doom_py/src/vizdoom/src/wildmidi/wildmidi_lib.cpp [2194:2293]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
						note_data->env_inc = 0;
						note_data = note_data->next;
						continue;
					} else if (note_data->modes & SAMPLE_CLAMPED) {
						note_data->env = 5;
						if (note_data->env_level
								> note_data->sample->env_target[5]) {
							note_data->env_inc =
									-note_data->sample->env_rate[5];
						} else {
							note_data->env_inc =
									note_data->sample->env_rate[5];
						}
						continue;
					}
					break;
				case 5:
					if (note_data->env_level == 0) {
						goto END_THIS_NOTE;
					}
					/* sample release */
					if (note_data->modes & SAMPLE_LOOP)
						note_data->modes ^= SAMPLE_LOOP;
					note_data->env_inc = 0;
					note_data = note_data->next;
					continue;
				case 6:
					END_THIS_NOTE:
					if (note_data->replay != NULL) {
						note_data->active = 0;
						{
							struct _note *prev_note = NULL;
							struct _note *nte_array = mdi->note;

							if (nte_array != note_data) {
								do {
									prev_note = nte_array;
									nte_array = nte_array->next;
								} while (nte_array != note_data);
							}
							if (prev_note) {
								prev_note->next = note_data->replay;
							} else {
								mdi->note = note_data->replay;
							}
							note_data->replay->next = note_data->next;
							note_data = note_data->replay;
							note_data->active = 1;
						}
					} else {
						note_data->active = 0;
						{
							struct _note *prev_note = NULL;
							struct _note *nte_array = mdi->note;

							if (nte_array != note_data) {
								do {
									prev_note = nte_array;
									nte_array = nte_array->next;
								} while ((nte_array != note_data)
										&& (nte_array));
							}
							if (prev_note) {
								prev_note->next = note_data->next;
							} else {
								mdi->note = note_data->next;
							}
							note_data = note_data->next;
						}
					}
					continue;
				}
				note_data->env++;

				if (note_data->is_off == 1) {
					do_note_off_extra(note_data);
				}

				if (note_data->env_level
						> note_data->sample->env_target[note_data->env]) {
					note_data->env_inc =
							-note_data->sample->env_rate[note_data->env];
				} else {
					note_data->env_inc =
							note_data->sample->env_rate[note_data->env];
				}
				note_data = note_data->next;
				continue;
			}

			/*
			 * =========================
			 * mix the channels together
			 * =========================
			 */
		}
		*buffer++ = left_mix;
		*buffer++ = right_mix;
	} while (--count);
	return buffer;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



doom_py/src/vizdoom/src/wildmidi/wildmidi_lib.cpp [2419:2518]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
						note_data->env_inc = 0;
						note_data = note_data->next;
						continue;
					} else if (note_data->modes & SAMPLE_CLAMPED) {
						note_data->env = 5;
						if (note_data->env_level
								> note_data->sample->env_target[5]) {
							note_data->env_inc =
									-note_data->sample->env_rate[5];
						} else {
							note_data->env_inc =
									note_data->sample->env_rate[5];
						}
						continue;
					}
					break;
				case 5:
					if (note_data->env_level == 0) {
						goto END_THIS_NOTE;
					}
					/* sample release */
					if (note_data->modes & SAMPLE_LOOP)
						note_data->modes ^= SAMPLE_LOOP;
					note_data->env_inc = 0;
					note_data = note_data->next;
					continue;
				case 6:
					END_THIS_NOTE:
					if (note_data->replay != NULL) {
						note_data->active = 0;
						{
							struct _note *prev_note = NULL;
							struct _note *nte_array = mdi->note;

							if (nte_array != note_data) {
								do {
									prev_note = nte_array;
									nte_array = nte_array->next;
								} while (nte_array != note_data);
							}
							if (prev_note) {
								prev_note->next = note_data->replay;
							} else {
								mdi->note = note_data->replay;
							}
							note_data->replay->next = note_data->next;
							note_data = note_data->replay;
							note_data->active = 1;
						}
					} else {
						note_data->active = 0;
						{
							struct _note *prev_note = NULL;
							struct _note *nte_array = mdi->note;

							if (nte_array != note_data) {
								do {
									prev_note = nte_array;
									nte_array = nte_array->next;
								} while ((nte_array != note_data)
										&& (nte_array));
							}
							if (prev_note) {
								prev_note->next = note_data->next;
							} else {
								mdi->note = note_data->next;
							}
							note_data = note_data->next;
						}
					}
					continue;
				}
				note_data->env++;

				if (note_data->is_off == 1) {
					do_note_off_extra(note_data);
				}

				if (note_data->env_level
						> note_data->sample->env_target[note_data->env]) {
					note_data->env_inc =
							-note_data->sample->env_rate[note_data->env];
				} else {
					note_data->env_inc =
							note_data->sample->env_rate[note_data->env];
				}
				note_data = note_data->next;
				continue;
			}

			/*
			 * =========================
			 * mix the channels together
			 * =========================
			 */
		}
		*buffer++ = left_mix;
		*buffer++ = right_mix;
	} while (--count);
	return buffer;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



