| 692 | | /* |
|---|
| 693 | | if (obj.equals(play1)) { |
|---|
| 694 | | if (play1.getText().startsWith(playButton)) { |
|---|
| 695 | | wavFile = wavFile1; |
|---|
| 696 | | duration = duration1; |
|---|
| 697 | | totalBytesWritten = totalBytesWritten1; |
|---|
| 698 | | System.err.println("=== Play1 ===");// !!!!!! |
|---|
| 699 | | playback.start(); |
|---|
| 700 | | System.err.println("duration:" + duration); |
|---|
| 701 | | fileName = promptID1; |
|---|
| 702 | | samplingGraph.start(); |
|---|
| 703 | | capt1.setEnabled(false); |
|---|
| 704 | | play1.setText(stopButton); |
|---|
| 705 | | } else { |
|---|
| 706 | | playback.stop(); |
|---|
| 707 | | samplingGraph.stop(); |
|---|
| 708 | | capt1.setEnabled(true); |
|---|
| 709 | | play1.setText(playButton); |
|---|
| 710 | | } |
|---|
| 711 | | } |
|---|
| 712 | | else if (obj.equals(play2)) { |
|---|
| 713 | | if (play2.getText().startsWith(playButton)) { |
|---|
| 714 | | wavFile = wavFile2; |
|---|
| 715 | | duration = duration2; |
|---|
| 716 | | totalBytesWritten = totalBytesWritten2; |
|---|
| 717 | | System.err.println("=== Play2 ===");// !!!!!! |
|---|
| 718 | | playback.start(); |
|---|
| 719 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 720 | | fileName = promptID2; |
|---|
| 721 | | samplingGraph.start(); |
|---|
| 722 | | capt2.setEnabled(false); |
|---|
| 723 | | play2.setText(stopButton); |
|---|
| 724 | | } else { |
|---|
| 725 | | playback.stop(); |
|---|
| 726 | | samplingGraph.stop(); |
|---|
| 727 | | capt2.setEnabled(true); |
|---|
| 728 | | play2.setText(playButton); |
|---|
| 729 | | } |
|---|
| 730 | | } |
|---|
| 731 | | else if (obj.equals(play3)) { |
|---|
| 732 | | if (play3.getText().startsWith(playButton)) { |
|---|
| 733 | | wavFile = wavFile3; |
|---|
| 734 | | duration = duration3; |
|---|
| 735 | | totalBytesWritten = totalBytesWritten3; |
|---|
| 736 | | System.err.println("=== Play3 ===");// !!!!!! |
|---|
| 737 | | playback.start(); |
|---|
| 738 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 739 | | fileName = promptID3; |
|---|
| 740 | | samplingGraph.start(); |
|---|
| 741 | | capt3.setEnabled(false); |
|---|
| 742 | | play3.setText(stopButton); |
|---|
| 743 | | } else { |
|---|
| 744 | | playback.stop(); |
|---|
| 745 | | samplingGraph.stop(); |
|---|
| 746 | | capt3.setEnabled(true); |
|---|
| 747 | | play3.setText(playButton); |
|---|
| 748 | | } |
|---|
| 749 | | } |
|---|
| 750 | | else if (obj.equals(play4)) { |
|---|
| 751 | | if (play4.getText().startsWith(playButton)) { |
|---|
| 752 | | wavFile = wavFile4; |
|---|
| 753 | | duration = duration4; |
|---|
| 754 | | totalBytesWritten = totalBytesWritten4; |
|---|
| 755 | | System.err.println("=== Play4 ===");// !!!!!! |
|---|
| 756 | | playback.start(); |
|---|
| 757 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 758 | | fileName = promptID4; |
|---|
| 759 | | samplingGraph.start(); |
|---|
| 760 | | capt4.setEnabled(false); |
|---|
| 761 | | play4.setText(stopButton); |
|---|
| 762 | | } else { |
|---|
| 763 | | playback.stop(); |
|---|
| 764 | | samplingGraph.stop(); |
|---|
| 765 | | capt4.setEnabled(true); |
|---|
| 766 | | play4.setText(playButton); |
|---|
| 767 | | } |
|---|
| 768 | | } |
|---|
| 769 | | else if (obj.equals(play5)) { |
|---|
| 770 | | if (play5.getText().startsWith(playButton)) { |
|---|
| 771 | | wavFile = wavFile5; |
|---|
| 772 | | duration = duration5; |
|---|
| 773 | | totalBytesWritten = totalBytesWritten5; |
|---|
| 774 | | System.err.println("=== Play5 ===");// !!!!!! |
|---|
| 775 | | playback.start(); |
|---|
| 776 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 777 | | fileName = promptID5; |
|---|
| 778 | | samplingGraph.start(); |
|---|
| 779 | | capt5.setEnabled(false); |
|---|
| 780 | | play5.setText(stopButton); |
|---|
| 781 | | } else { |
|---|
| 782 | | playback.stop(); |
|---|
| 783 | | samplingGraph.stop(); |
|---|
| 784 | | capt5.setEnabled(true); |
|---|
| 785 | | play5.setText(playButton); |
|---|
| 786 | | } |
|---|
| 787 | | } |
|---|
| 788 | | else if (obj.equals(play6)) { |
|---|
| 789 | | if (play6.getText().startsWith(playButton)) { |
|---|
| 790 | | wavFile = wavFile6; |
|---|
| 791 | | duration = duration6; |
|---|
| 792 | | totalBytesWritten = totalBytesWritten6; |
|---|
| 793 | | System.err.println("=== Play6 ===");// !!!!!! |
|---|
| 794 | | playback.start(); |
|---|
| 795 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 796 | | fileName = promptID6; |
|---|
| 797 | | samplingGraph.start(); |
|---|
| 798 | | capt6.setEnabled(false); |
|---|
| 799 | | play6.setText(stopButton); |
|---|
| 800 | | } else { |
|---|
| 801 | | playback.stop(); |
|---|
| 802 | | samplingGraph.stop(); |
|---|
| 803 | | capt6.setEnabled(true); |
|---|
| 804 | | play6.setText(playButton); |
|---|
| 805 | | } |
|---|
| 806 | | } |
|---|
| 807 | | else if (obj.equals(play7)) { |
|---|
| 808 | | if (play7.getText().startsWith(playButton)) { |
|---|
| 809 | | wavFile = wavFile7; |
|---|
| 810 | | duration = duration7; |
|---|
| 811 | | totalBytesWritten = totalBytesWritten7; |
|---|
| 812 | | System.err.println("=== Play7 ===");// !!!!!! |
|---|
| 813 | | playback.start(); |
|---|
| 814 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 815 | | fileName = promptID7; |
|---|
| 816 | | samplingGraph.start(); |
|---|
| 817 | | capt7.setEnabled(false); |
|---|
| 818 | | play7.setText(stopButton); |
|---|
| 819 | | } else { |
|---|
| 820 | | playback.stop(); |
|---|
| 821 | | samplingGraph.stop(); |
|---|
| 822 | | capt7.setEnabled(true); |
|---|
| 823 | | play7.setText(playButton); |
|---|
| 824 | | } |
|---|
| 825 | | } |
|---|
| 826 | | else if (obj.equals(play8)) { |
|---|
| 827 | | if (play8.getText().startsWith(playButton)) { |
|---|
| 828 | | wavFile = wavFile8; |
|---|
| 829 | | duration = duration8; |
|---|
| 830 | | totalBytesWritten = totalBytesWritten8; |
|---|
| 831 | | System.err.println("=== Play8 ===");// !!!!!! |
|---|
| 832 | | playback.start(); |
|---|
| 833 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 834 | | fileName = promptID8; |
|---|
| 835 | | samplingGraph.start(); |
|---|
| 836 | | capt8.setEnabled(false); |
|---|
| 837 | | play8.setText(stopButton); |
|---|
| 838 | | } else { |
|---|
| 839 | | playback.stop(); |
|---|
| 840 | | samplingGraph.stop(); |
|---|
| 841 | | capt8.setEnabled(true); |
|---|
| 842 | | play8.setText(playButton); |
|---|
| 843 | | } |
|---|
| 844 | | } |
|---|
| 845 | | else if (obj.equals(play9)) { |
|---|
| 846 | | if (play9.getText().startsWith(playButton)) { |
|---|
| 847 | | wavFile = wavFile9; |
|---|
| 848 | | duration = duration9; |
|---|
| 849 | | totalBytesWritten = totalBytesWritten9; |
|---|
| 850 | | System.err.println("=== Play9 ===");// !!!!!! |
|---|
| 851 | | playback.start(); |
|---|
| 852 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 853 | | fileName = promptID9; |
|---|
| 854 | | samplingGraph.start(); |
|---|
| 855 | | capt9.setEnabled(false); |
|---|
| 856 | | play9.setText(stopButton); |
|---|
| 857 | | } else { |
|---|
| 858 | | playback.stop(); |
|---|
| 859 | | samplingGraph.stop(); |
|---|
| 860 | | capt9.setEnabled(true); |
|---|
| 861 | | play9.setText(playButton); |
|---|
| 862 | | } |
|---|
| 863 | | } |
|---|
| 864 | | else if (obj.equals(play10)) { |
|---|
| 865 | | if (play10.getText().startsWith(playButton)) { |
|---|
| 866 | | wavFile = wavFile10; |
|---|
| 867 | | duration = duration10; |
|---|
| 868 | | totalBytesWritten = totalBytesWritten10; |
|---|
| 869 | | System.err.println("=== Play10 ===");// !!!!!! |
|---|
| 870 | | playback.start(); |
|---|
| 871 | | System.err.println("duration:" + duration); // !!!!!! |
|---|
| 872 | | fileName = promptID10; |
|---|
| 873 | | samplingGraph.start(); |
|---|
| 874 | | capt10.setEnabled(false); |
|---|
| 875 | | play10.setText(stopButton); |
|---|
| 876 | | } else { |
|---|
| 877 | | playback.stop(); |
|---|
| 878 | | samplingGraph.stop(); |
|---|
| 879 | | capt10.setEnabled(true); |
|---|
| 880 | | play10.setText(playButton); |
|---|
| 881 | | } |
|---|
| 882 | | } |
|---|
| 883 | | |
|---|
| 884 | | // ################### Record ####################################### |
|---|
| 885 | | else if (obj.equals(capt1)) { |
|---|
| 886 | | if (capt1.getText().startsWith(recordButton)) { |
|---|
| 887 | | file = null; |
|---|
| 888 | | wavFile = wavFile1; |
|---|
| 889 | | System.err.println("=== Record1 ==="); // !!!!!! |
|---|
| 890 | | capture.start(uploadWavFile1); |
|---|
| 891 | | fileName = promptID1; |
|---|
| 892 | | samplingGraph.start(); |
|---|
| 893 | | saveButtonState(); |
|---|
| 894 | | setButtonsOff(); |
|---|
| 895 | | capt1.setEnabled(true); |
|---|
| 896 | | capt1.setText(stopButton); |
|---|
| 897 | | moreInfoB.setEnabled(false); |
|---|
| 898 | | aboutB.setEnabled(false); |
|---|
| 899 | | } else { |
|---|
| 900 | | lines.removeAllElements(); |
|---|
| 901 | | capture.stop(); |
|---|
| 902 | | totalBytesWritten1 = totalBytesWritten; // !!!!!! |
|---|
| 903 | | duration1 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 904 | | System.err.println("duration1:" + duration1); |
|---|
| 905 | | samplingGraph.stop(); |
|---|
| 906 | | restoreButtonState(); |
|---|
| 907 | | play1.setEnabled(true); |
|---|
| 908 | | capt1.setText(recordButton); |
|---|
| 909 | | moreInfoB.setEnabled(true); |
|---|
| 910 | | aboutB.setEnabled(true); |
|---|
| 911 | | capt2.setEnabled(true); |
|---|
| 912 | | } |
|---|
| 913 | | } |
|---|
| 914 | | else if (obj.equals(capt2)) { |
|---|
| 915 | | if (capt2.getText().startsWith(recordButton)) { |
|---|
| 916 | | file = null; |
|---|
| 917 | | wavFile = wavFile2; |
|---|
| 918 | | System.err.println("=== Record2 ==="); // !!!!!! |
|---|
| 919 | | capture.start(uploadWavFile2); |
|---|
| 920 | | fileName = promptID2; |
|---|
| 921 | | samplingGraph.start(); |
|---|
| 922 | | saveButtonState(); |
|---|
| 923 | | setButtonsOff(); |
|---|
| 924 | | capt2.setEnabled(true); |
|---|
| 925 | | capt2.setText(stopButton); |
|---|
| 926 | | moreInfoB.setEnabled(false); |
|---|
| 927 | | aboutB.setEnabled(false); |
|---|
| 928 | | } else { |
|---|
| 929 | | lines.removeAllElements(); |
|---|
| 930 | | capture.stop(); |
|---|
| 931 | | totalBytesWritten2 = totalBytesWritten; // !!!!!! |
|---|
| 932 | | duration2 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 933 | | System.err.println("duration2:" + duration2); |
|---|
| 934 | | samplingGraph.stop(); |
|---|
| 935 | | restoreButtonState(); |
|---|
| 936 | | play2.setEnabled(true); |
|---|
| 937 | | capt2.setText(recordButton); |
|---|
| 938 | | moreInfoB.setEnabled(true); |
|---|
| 939 | | aboutB.setEnabled(true); |
|---|
| 940 | | capt3.setEnabled(true); |
|---|
| 941 | | } |
|---|
| 942 | | } |
|---|
| 943 | | else if (obj.equals(capt3)) { |
|---|
| 944 | | if (capt3.getText().startsWith(recordButton)) { |
|---|
| 945 | | file = null; |
|---|
| 946 | | wavFile = wavFile3; |
|---|
| 947 | | System.err.println("=== Record3 ==="); // !!!!!! |
|---|
| 948 | | capture.start(uploadWavFile3); |
|---|
| 949 | | fileName = promptID3; |
|---|
| 950 | | samplingGraph.start(); |
|---|
| 951 | | saveButtonState(); |
|---|
| 952 | | setButtonsOff(); |
|---|
| 953 | | capt3.setEnabled(true); |
|---|
| 954 | | capt3.setText(stopButton); |
|---|
| 955 | | moreInfoB.setEnabled(false); |
|---|
| 956 | | aboutB.setEnabled(false); |
|---|
| 957 | | } else { |
|---|
| 958 | | lines.removeAllElements(); |
|---|
| 959 | | capture.stop(); |
|---|
| 960 | | totalBytesWritten3 = totalBytesWritten; // !!!!!! |
|---|
| 961 | | duration3 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 962 | | System.err.println("duration3:" + duration3); |
|---|
| 963 | | samplingGraph.stop(); |
|---|
| 964 | | restoreButtonState(); |
|---|
| 965 | | play3.setEnabled(true); |
|---|
| 966 | | capt3.setText(recordButton); |
|---|
| 967 | | moreInfoB.setEnabled(true); |
|---|
| 968 | | aboutB.setEnabled(true); |
|---|
| 969 | | capt4.setEnabled(true); |
|---|
| 970 | | } |
|---|
| 971 | | } |
|---|
| 972 | | else if (obj.equals(capt4)) { |
|---|
| 973 | | if (capt4.getText().startsWith(recordButton)) { |
|---|
| 974 | | file = null; |
|---|
| 975 | | wavFile = wavFile4; |
|---|
| 976 | | System.err.println("=== Record4 ==="); // !!!!!! |
|---|
| 977 | | capture.start(uploadWavFile4); |
|---|
| 978 | | fileName = promptID4; |
|---|
| 979 | | samplingGraph.start(); |
|---|
| 980 | | saveButtonState(); |
|---|
| 981 | | setButtonsOff(); |
|---|
| 982 | | capt4.setEnabled(true); |
|---|
| 983 | | capt4.setText(stopButton); |
|---|
| 984 | | moreInfoB.setEnabled(false); |
|---|
| 985 | | aboutB.setEnabled(false); |
|---|
| 986 | | } else { |
|---|
| 987 | | lines.removeAllElements(); |
|---|
| 988 | | capture.stop(); |
|---|
| 989 | | totalBytesWritten4 = totalBytesWritten; // !!!!!! |
|---|
| 990 | | duration4 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 991 | | samplingGraph.stop(); |
|---|
| 992 | | System.err.println("duration4:" + duration4); |
|---|
| 993 | | restoreButtonState(); |
|---|
| 994 | | play4.setEnabled(true); |
|---|
| 995 | | capt4.setText(recordButton); |
|---|
| 996 | | moreInfoB.setEnabled(true); |
|---|
| 997 | | aboutB.setEnabled(true); |
|---|
| 998 | | capt5.setEnabled(true); |
|---|
| 999 | | } |
|---|
| 1000 | | } |
|---|
| 1001 | | else if (obj.equals(capt5)) { |
|---|
| 1002 | | if (capt5.getText().startsWith(recordButton)) { |
|---|
| 1003 | | file = null; |
|---|
| 1004 | | wavFile = wavFile5; |
|---|
| 1005 | | System.err.println("=== Record5 ==="); // !!!!!! |
|---|
| 1006 | | capture.start(uploadWavFile5); |
|---|
| 1007 | | fileName = promptID5; |
|---|
| 1008 | | samplingGraph.start(); |
|---|
| 1009 | | saveButtonState(); |
|---|
| 1010 | | setButtonsOff(); |
|---|
| 1011 | | capt5.setEnabled(true); |
|---|
| 1012 | | capt5.setText(stopButton); |
|---|
| 1013 | | moreInfoB.setEnabled(false); |
|---|
| 1014 | | aboutB.setEnabled(false); |
|---|
| 1015 | | } else { |
|---|
| 1016 | | lines.removeAllElements(); |
|---|
| 1017 | | capture.stop(); |
|---|
| 1018 | | totalBytesWritten5 = totalBytesWritten; // !!!!!! |
|---|
| 1019 | | duration5 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1020 | | System.err.println("duration5:" + duration5); |
|---|
| 1021 | | samplingGraph.stop(); |
|---|
| 1022 | | restoreButtonState(); |
|---|
| 1023 | | play5.setEnabled(true); |
|---|
| 1024 | | capt5.setText(recordButton); |
|---|
| 1025 | | moreInfoB.setEnabled(true); |
|---|
| 1026 | | aboutB.setEnabled(true); |
|---|
| 1027 | | capt6.setEnabled(true); |
|---|
| 1028 | | } |
|---|
| 1029 | | } |
|---|
| 1030 | | else if (obj.equals(capt6)) { |
|---|
| 1031 | | if (capt6.getText().startsWith(recordButton)) { |
|---|
| 1032 | | file = null; |
|---|
| 1033 | | wavFile = wavFile6; |
|---|
| 1034 | | System.err.println("=== Record6 ===");// !!!!!! |
|---|
| 1035 | | capture.start(uploadWavFile6); |
|---|
| 1036 | | fileName = promptID6; |
|---|
| 1037 | | samplingGraph.start(); |
|---|
| 1038 | | saveButtonState(); |
|---|
| 1039 | | setButtonsOff(); |
|---|
| 1040 | | capt6.setEnabled(true); |
|---|
| 1041 | | capt6.setText(stopButton); |
|---|
| 1042 | | moreInfoB.setEnabled(false); |
|---|
| 1043 | | aboutB.setEnabled(false); |
|---|
| 1044 | | } else { |
|---|
| 1045 | | lines.removeAllElements(); |
|---|
| 1046 | | capture.stop(); |
|---|
| 1047 | | totalBytesWritten6 = totalBytesWritten; // !!!!!! |
|---|
| 1048 | | duration6 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1049 | | System.err.println("duration6:" + duration6); |
|---|
| 1050 | | samplingGraph.stop(); |
|---|
| 1051 | | restoreButtonState(); |
|---|
| 1052 | | play6.setEnabled(true); |
|---|
| 1053 | | capt6.setText(recordButton); |
|---|
| 1054 | | moreInfoB.setEnabled(true); |
|---|
| 1055 | | aboutB.setEnabled(true); |
|---|
| 1056 | | capt7.setEnabled(true); |
|---|
| 1057 | | } |
|---|
| 1058 | | } |
|---|
| 1059 | | else if (obj.equals(capt7)) { |
|---|
| 1060 | | if (capt7.getText().startsWith(recordButton)) { |
|---|
| 1061 | | file = null; |
|---|
| 1062 | | wavFile = wavFile7; |
|---|
| 1063 | | System.err.println("=== Record7 ===");// !!!!!! |
|---|
| 1064 | | capture.start(uploadWavFile7); |
|---|
| 1065 | | fileName = promptID7; |
|---|
| 1066 | | samplingGraph.start(); |
|---|
| 1067 | | saveButtonState(); |
|---|
| 1068 | | setButtonsOff(); |
|---|
| 1069 | | capt7.setEnabled(true); |
|---|
| 1070 | | capt7.setText(stopButton); |
|---|
| 1071 | | moreInfoB.setEnabled(false); |
|---|
| 1072 | | aboutB.setEnabled(false); |
|---|
| 1073 | | } else { |
|---|
| 1074 | | lines.removeAllElements(); |
|---|
| 1075 | | capture.stop(); |
|---|
| 1076 | | totalBytesWritten7 = totalBytesWritten; // !!!!!! |
|---|
| 1077 | | duration7 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1078 | | System.err.println("duration7:" + duration7); |
|---|
| 1079 | | samplingGraph.stop(); |
|---|
| 1080 | | restoreButtonState(); |
|---|
| 1081 | | play7.setEnabled(true); |
|---|
| 1082 | | capt7.setText(recordButton); |
|---|
| 1083 | | moreInfoB.setEnabled(true); |
|---|
| 1084 | | aboutB.setEnabled(true); |
|---|
| 1085 | | capt8.setEnabled(true); |
|---|
| 1086 | | } |
|---|
| 1087 | | } |
|---|
| 1088 | | else if (obj.equals(capt8)) { |
|---|
| 1089 | | if (capt8.getText().startsWith(recordButton)) { |
|---|
| 1090 | | file = null; |
|---|
| 1091 | | wavFile = wavFile8; |
|---|
| 1092 | | System.err.println("=== Record8 ===");// !!!!!! |
|---|
| 1093 | | capture.start(uploadWavFile8); |
|---|
| 1094 | | fileName = promptID8; |
|---|
| 1095 | | samplingGraph.start(); |
|---|
| 1096 | | saveButtonState(); |
|---|
| 1097 | | setButtonsOff(); |
|---|
| 1098 | | capt8.setEnabled(true); |
|---|
| 1099 | | capt8.setText(stopButton); |
|---|
| 1100 | | moreInfoB.setEnabled(false); |
|---|
| 1101 | | aboutB.setEnabled(false); |
|---|
| 1102 | | } else { |
|---|
| 1103 | | lines.removeAllElements(); |
|---|
| 1104 | | capture.stop(); |
|---|
| 1105 | | totalBytesWritten8 = totalBytesWritten; // !!!!!! |
|---|
| 1106 | | duration8 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1107 | | System.err.println("duration8:" + duration8); |
|---|
| 1108 | | samplingGraph.stop(); |
|---|
| 1109 | | restoreButtonState(); |
|---|
| 1110 | | play8.setEnabled(true); |
|---|
| 1111 | | capt8.setText(recordButton); |
|---|
| 1112 | | moreInfoB.setEnabled(true); |
|---|
| 1113 | | aboutB.setEnabled(true); |
|---|
| 1114 | | capt9.setEnabled(true); |
|---|
| 1115 | | } |
|---|
| 1116 | | } |
|---|
| 1117 | | else if (obj.equals(capt9)) { |
|---|
| 1118 | | if (capt9.getText().startsWith(recordButton)) { |
|---|
| 1119 | | file = null; |
|---|
| 1120 | | wavFile = wavFile9; |
|---|
| 1121 | | System.err.println("=== Record9 ===");// !!!!!! |
|---|
| 1122 | | capture.start(uploadWavFile9); |
|---|
| 1123 | | fileName = promptID9; |
|---|
| 1124 | | samplingGraph.start(); |
|---|
| 1125 | | saveButtonState(); |
|---|
| 1126 | | setButtonsOff(); |
|---|
| 1127 | | capt9.setEnabled(true); |
|---|
| 1128 | | capt9.setText(stopButton); |
|---|
| 1129 | | moreInfoB.setEnabled(false); |
|---|
| 1130 | | aboutB.setEnabled(false); |
|---|
| 1131 | | } else { |
|---|
| 1132 | | lines.removeAllElements(); |
|---|
| 1133 | | capture.stop(); |
|---|
| 1134 | | totalBytesWritten9 = totalBytesWritten; // !!!!!! |
|---|
| 1135 | | duration9 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1136 | | System.err.println("duration9:" + duration9); |
|---|
| 1137 | | samplingGraph.stop(); |
|---|
| 1138 | | restoreButtonState(); |
|---|
| 1139 | | play9.setEnabled(true); |
|---|
| 1140 | | capt9.setText(recordButton); |
|---|
| 1141 | | moreInfoB.setEnabled(true); |
|---|
| 1142 | | aboutB.setEnabled(true); |
|---|
| 1143 | | capt10.setEnabled(true); |
|---|
| 1144 | | } |
|---|
| 1145 | | } |
|---|
| 1146 | | else if (obj.equals(capt10)) { |
|---|
| 1147 | | if (capt10.getText().startsWith(recordButton)) { |
|---|
| 1148 | | file = null; |
|---|
| 1149 | | wavFile = wavFile10; |
|---|
| 1150 | | System.err.println("=== Record10 ===");// !!!!!! |
|---|
| 1151 | | capture.start(uploadWavFile10); |
|---|
| 1152 | | fileName = promptID10; |
|---|
| 1153 | | samplingGraph.start(); |
|---|
| 1154 | | saveButtonState(); |
|---|
| 1155 | | setButtonsOff(); |
|---|
| 1156 | | capt10.setEnabled(true); |
|---|
| 1157 | | capt10.setText(stopButton); |
|---|
| 1158 | | moreInfoB.setEnabled(false); |
|---|
| 1159 | | aboutB.setEnabled(false); |
|---|
| 1160 | | } else { |
|---|
| 1161 | | lines.removeAllElements(); |
|---|
| 1162 | | capture.stop(); |
|---|
| 1163 | | totalBytesWritten10 = totalBytesWritten; // !!!!!! |
|---|
| 1164 | | duration10 = totalBytesWritten / (double) (format.getSampleRate() * format.getSampleSizeInBits()/ 8); |
|---|
| 1165 | | System.err.println("duration10:" + duration10); |
|---|
| 1166 | | samplingGraph.stop(); |
|---|
| 1167 | | restoreButtonState(); |
|---|
| 1168 | | play10.setEnabled(true); |
|---|
| 1169 | | capt10.setText(recordButton); |
|---|
| 1170 | | moreInfoB.setEnabled(true); |
|---|
| 1171 | | aboutB.setEnabled(true); |
|---|
| 1172 | | uploadB.setEnabled(true); |
|---|
| 1173 | | } |
|---|
| 1174 | | } |
|---|
| 1175 | | !!!!!! */ |
|---|
| | 592 | |
|---|